-
Notifications
You must be signed in to change notification settings - Fork 12
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
Error removing tr when data array is altered #3
Comments
Hi @dejan9393, thanks for the issue. Thx ! |
Yep i'm also using the included footer for changing page/size of the data and most of the time it works fine - it's only with certain changes in the size of the data that it actually happens. I think it's because the array is re-indexed when it is spliced, so the next iteration removes a TR node but then removes no row from the Example: Let's say table is an array of 4 rows:
We change the size of our data to 2, leaving only two rows, splicing indexes 3 & 4 from
Next time the data changes and we attempt to remove the |
great, its fixed by your PR thx ! |
Receiving an "Uncaught DOMException: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node." when changing the data array, only under certain conditions which I haven't dug deep enough to figure out.
I have managed to make a specific reproduction to showcase the issue by initially having a data array with 10 elements, updating it to an array of 6 elements, then again down to 4 elements:
demo here:
https://infrequent-air.glitch.me/
The text was updated successfully, but these errors were encountered: