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

Avoid re-rendering when list item is spliced #500

Open
n1vlac opened this issue Dec 9, 2017 · 0 comments
Open

Avoid re-rendering when list item is spliced #500

n1vlac opened this issue Dec 9, 2017 · 0 comments

Comments

@n1vlac
Copy link

n1vlac commented Dec 9, 2017

If a single item is spliced, iron-list re-uses the spliced item's DOM elements to re-render the item below it, causing a downstream re-render of the remaining items. If the template contains an image, this can cause a visual flicker as the image elements are re-bound with new src values.

For example:

  1. List of A B C D
  2. Remove item C
  3. List updates - A B (C -> D) (D -> hidden)
  • DOM elements for C are re-used to render D
  • DOM elements for D prior to deleting C are hidden

Ideally, D would not be re-rendered using C's DOM elements and simply remove/hide C.

An example use case is a user removing a video from a playlist, with each item in the list containing an image and text.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants