Open StupidIncarnate opened 6 years ago
This is because dropdowns use the transition module https://semantic-ui.com/modules/transition.html and it requires it to be attached to the DOM.
Try disabling the transition using the dropdown settings https://semantic-ui.com/modules/dropdown.html#/settings
Like so?
If I do that I get double the error right when I try to click on it, even before rerendering. stop instead of stop all does the same.
I'm fine with it attaching to the dom, and I like the transition. I'm more looking for if there's a way to clean up that dom connection if I rerender so it can reattach when the element gets redrawn.
It looks like if I give it a unique name, it doesn't throw that dom error when it rerenders. I assume because it rehooks up based on that name, rather than a random binding without the name?
[Components] How do you cleanup bindings on select (and others) when rerendering dom elements manually?
Steps
I'm using backbone so I manually build and rerender dom sections repeatedly. I figured out how to manually bind to a select to give it the events it needs, but when I rerender the view, it's giving this error, so I'm wondering how do I clean up these event bindings before I rerender.
I tried these but neither seems to get rid of the attachment error:
I know it says to just disable the warning, but I would like to clean them up if possible so there's not straggler events on the dom.
Expected Result
To be able to unbind select events from dom so nothing lingers when the dom element is rerendered.
Actual Result
It's throwing a binding event error when I rerender a dom partial.
Version
2.3.1