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

Removal of item re-renders the whole list instead of removing a particular node #515

Closed
brijeshb42 opened this issue Dec 29, 2017 · 3 comments
Labels
bug Something isn't working outdated Forgotten lore website hyperapp.dev

Comments

@brijeshb42
Copy link

Here's a gif from Firefox devtools

hyperapp

The code that I used is here

I have taken care of generating unique ids for each list item. Ideally, removal of an item from array should just remove the corresponding node instead of re-rendering the whole list.

@jorgebucaran
Copy link
Owner

Is this related to #499? If so, I'd prefer to track it there. This is not a huge problem, but it's something I definitely want to tackle in 2018.

@jorgebucaran
Copy link
Owner

jorgebucaran commented Dec 29, 2017

@brijeshb42 Nevermind. We are just reattaching event listeners, the DOM nodes are not recreated.

The reason the nodes are flashing is because the algorithm is changing their order with element.insertBefore inside patch. There's still room for improvement, however and I'd like to implement a more complex algorithm as described right here.

@jorgebucaran jorgebucaran added the website hyperapp.dev label Dec 29, 2017
@jorgebucaran
Copy link
Owner

jorgebucaran commented Dec 29, 2017

#499

@jorgebucaran jorgebucaran added bug Something isn't working outdated Forgotten lore labels Sep 1, 2018
Repository owner locked as resolved and limited conversation to collaborators Sep 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working outdated Forgotten lore website hyperapp.dev
Projects
None yet
Development

No branches or pull requests

2 participants