Closed johannes-z closed 5 years ago
Hey @johannes-z ,
I just made a quick look. Your Container has some components other than Draggable. Try to organize your structure so that Container will have only Draggable type of children. Otherwise anything can go wrong. Let me know if the issue insists after doing that.
Cheers!
@kutlugsahin Thanks, that did actually work. For everybody else having the same issue (I'm using vue):
This does not work:
<Container>
<h2>Some Heading</h2>
<Draggable>...</Draggable>
</Container>
This works:
<h2>Some Heading</h2>
<Container>
<Draggable>...</Draggable>
</Container>
I get the following error when hiding/unhiding the container where the drag-handle is in and clicking the drag-handle:I narrowed down the error, which happens when the
Container
receives classes that change, e.g. when adding/removing a class conditionally. As soon as the classList changes, the error gets thrown.I think it is this function:
https://github.com/kutlugsahin/smooth-dnd/blob/136e6d50251aeae4cfb466a55ef6d16224d01516/src/mediator.ts#L321
I have a private repo that serves as a repro, I added you, @kutlugsahin, as a contributor to check the error.