Skip to content
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

Can't Swap elements after everything in the Slot Item Map has changed (React Dynamic) #121

Open
hriiss opened this issue Jan 25, 2025 · 0 comments

Comments

@hriiss
Copy link

hriiss commented Jan 25, 2025

Hello,

It seems like, once every draggable element was moved from its default position, you cannot drag the elements anymore.

Example (Initial list):

const initial = [
  { id: '1', title: 'item1' },
  { id: '2', title: 'item2' },
  { id: '3', title: 'item3' },
]

Now if you drag all the elements to a different slot, like this:

const initial = [
 { id: '1', title: 'item2' },
 { id: '2', title: 'item3' },
 { id: '3', title: 'item1' },
]

You cannot drag any elements anymore.
Not sure if it's any issue on my side.

Note: my initialItems list has more fields than "id" and "title"

Edit:
I also getting this error randomly when dragging and dropping items:
_app-pages-browser_app_components_links_tsx.js:3816 Uncaught TypeError: Cannot read properties of null (reading 'dataset')
Source:

  function G() {
    return e.slotById(n.el().parentElement.dataset.swapySlot);
  }
@hriiss hriiss changed the title Can't Swap elements after everything i n the Slot Item Map has changed (React Dynamic) Can't Swap elements after everything in the Slot Item Map has changed (React Dynamic) Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant