Closed martinpengellyphillips closed 2 years ago
When attempting to drag a draggable that has been composed manually using the `draggable.dragActivators' property, an error will occur:
Uncaught TypeError: eventMap[key] is undefined key drag-drop-context.jsx:92
This is due to the asHandlers logic renaming a key naively causing a lookup error:
asHandlers
for (let key in eventMap) { if (asHandlers) { key = `on${key}`; // <- renaming here } listeners[key] = (event) => { for (const { activator } of eventMap[key]) { // <- breaks lookup here if (anySensorActive()) { break; } activator({ event, draggableId }); } }; }
This doesn't affect usage as a directive, because that does not use the asHandlers form.
Fixed and released in 0.4.0
When attempting to drag a draggable that has been composed manually using the `draggable.dragActivators' property, an error will occur:
This is due to the
asHandlers
logic renaming a key naively causing a lookup error:This doesn't affect usage as a directive, because that does not use the
asHandlers
form.