Closed
Description
Thanks again for this lib.
I have several lists on my page, and want to be able to drag items between lists. For this, I give every list the same sortable group
option.
This is how I am trying to manage the state when dragging an item between lists:
- use
remove
event to remove item from the state - use
add
event to add the item back to the state in its new location
My state is updating just fine, however, the orginal DOM element is moved to the new list (and not removed from the DOM). This results in duplicates (because my state also creates a new element).
Currently, it looks like my options are to either:
- manually remove the DOM element with
event.item.remove()
OR - force re-render my component to keep the state in sync
Both of these seem hacky - is there a better approach?
Metadata
Metadata
Assignees
Labels
No labels