vue-react-dnd
Version:
Vue Drag and Drop Library based on react-dnd
14 lines (11 loc) • 308 B
JavaScript
export default function registerTarget (type, target, manager) {
const registry = manager.getRegistry()
const targetId = registry.addTarget(type, target)
function unregisterTarget () {
registry.removeTarget(targetId)
}
return {
handlerId: targetId,
unregister: unregisterTarget
}
}