You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed, that if I use pre-existing table and pass it to List.js, then any event listeners that were added to the original elements disappear. Little example:
This is most probably caused by using innerHTML when processing the list. It might be known bug or even intended behavior, but I haven't found any mention of this in documentation. It is unfortunately quite surprising and rather annoying.
If someone comes across this in future and looks for a workaround: Setting the callbacks in onclick attribute instead of using addEventListener('click', ...) seems to work correctly.
The text was updated successfully, but these errors were encountered:
I can confirm that this happens to me too. Specifically it happens when list.js is applied to a pre-existing table; I didn't have the same issue with pre-existing lists. (Using the onclick attribute did not work in my case.)
I have noticed, that if I use pre-existing table and pass it to List.js, then any event listeners that were added to the original elements disappear. Little example:
This is most probably caused by using
innerHTML
when processing the list. It might be known bug or even intended behavior, but I haven't found any mention of this in documentation. It is unfortunately quite surprising and rather annoying.If someone comes across this in future and looks for a workaround: Setting the callbacks in
onclick
attribute instead of usingaddEventListener('click', ...)
seems to work correctly.The text was updated successfully, but these errors were encountered: