react-beautiful-dnd-next
Version:
Beautiful and accessible drag and drop for lists with React
17 lines (12 loc) • 303 B
JavaScript
// @flow
import type { DroppableId, DropResult } from '../../types';
export default (result: DropResult): ?DroppableId => {
const { combine, destination } = result;
if (destination) {
return destination.droppableId;
}
if (combine) {
return combine.droppableId;
}
return null;
};