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

The number of enabled nodes does not match the number of values. #78

Closed
valentinoPereira opened this issue Jun 25, 2024 · 4 comments
Closed

Comments

@valentinoPereira
Copy link

valentinoPereira commented Jun 25, 2024

I seem to be getting this console warning. I have set the following property on my hook:

draggable: (el: HTMLElement) => {
      return el.dataset.candrag !== 'false';
},

A few items can be dragged, a few items cannot - accordingly they get a data-candrag attribute. But none of my items are draggable like this even though console logging the output of el.dataset.candrag !== 'false' gives me the exact boolean values. eg: [true, true, false, false] - In this case, first 2 items should be draggable, other two should not. But in the output, none can be dragged

@sashamilenkovic
Copy link
Contributor

@valentinoPereira I'd be happy to take a look at a reproduction if you can make one.

@revenkroz
Copy link
Contributor

revenkroz commented Jun 26, 2024

For me this issue appeared when dragAndDrop was created with value instead of values in Vue.

In docs:

dragAndDrop({
  parent: parentRef,
  value: valueRef
})

Should be:

dragAndDrop({
  parent: parentRef,
  values: valueRef
})

@psyspeedi
Copy link

@sashamilenkovic Hi! I found the same error when deleting the last element from a group and trying to move the element back. Dragged group inside
draggable group.

2024-07-03.21.03.28.mov

@sashamilenkovic
Copy link
Contributor

@psyspeedi This warning appears for quite a few different reasons. Underlying reason being that the number of values passed to the parent do not match the number of children that are rendered. I'm unable to diagnose this from your screen recording, but I'm happy to take a look at a reproduction.

@sashamilenkovic sashamilenkovic closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2024
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

4 participants