You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to set up logic whereby a container does not accept a new list item if it has only 1 element in it.
The "should-accept-drop" function achieves this, but also produces the following bug:
If I want to take the last item out, it makes a copy, rather than emptying the container.
The use case I have is: A user fills a number of empty containers from a populated list. He can only put 1 item in the container, but he can also take it out and put another item in. (It's for a field mapping project where you allocate table columns to a template...)
The text was updated successfully, but these errors were encountered:
When a container has only a single item left, your shouldAcceptDrop function returns false for it, even if it is the source of the draggable item. onDrop doesn't get fired then for the source container, and consequently no applyDrag to remove the item from the container occurs.
Hi and thanks for this nice package,
I try to set up logic whereby a container does not accept a new list item if it has only 1 element in it.
The "should-accept-drop" function achieves this, but also produces the following bug:
If I want to take the last item out, it makes a copy, rather than emptying the container.
pls see here: codesandbox.io/s/wkpzqk4mmk
The use case I have is: A user fills a number of empty containers from a populated list. He can only put 1 item in the container, but he can also take it out and put another item in. (It's for a field mapping project where you allocate table columns to a template...)
The text was updated successfully, but these errors were encountered: