-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input inside of draggable element is break #118
Comments
This is the error I see in the console:
If I modify to add a change handler to the reproduction it seems to work. |
I'm having a similar issue. Text Inputs and textarea won't fire My setup: export const QueueItemList = ({ items }: QueueItemListProps) => {
const handleDragEnd = () => {
setQueueItems(
queueItems.map((item, index) => ({ ...item, priority: index + 1 }))
);
};
const [parentRef, queueItems, setQueueItems, updateConfig] = useDragAndDrop<
HTMLDivElement,
QueueItemCardProps
>(items, {
sortable: true,
plugins: [animations()],
onDragend: handleDragEnd,
});
return (
<div ref={parentRef} className={styles.itemList}>
{queueItems.map((queueItem, index) => {
return (
<li key={queueItem.title + index}>
<QueueItemCard {...queueItem} />
</li>
);
})}
</div>
);
}; Where |
I solved the problem by using react portal for interactive elements. But it is not maintainable. |
If you try to write space, input is broke.
Reproduction:
https://codesandbox.io/p/sandbox/drag-ndrop-kit-forked-83wtw7?file=%2Fsrc%2FApp.tsx%3A1%2C10-1%2C24
The text was updated successfully, but these errors were encountered: