UNPKG

react-beautiful-dnd

Version:

A beautiful, accessible drag and drop library for lists with React.js

14 lines (11 loc) 386 B
// @flow import type { DroppableId, Position, DroppableDimensionMap } from '../types'; import isInsideDroppable from './is-inside-droppable'; export default ( target: Position, droppables: DroppableDimensionMap, ): ?DroppableId => { const maybeId: ?DroppableId = Object.keys(droppables) .find(key => isInsideDroppable(target, droppables[key])); return maybeId || null; };