Skip to content

Refresh items on content change #2

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

Closed
wants to merge 1 commit into from
Closed

Refresh items on content change #2

wants to merge 1 commit into from

Conversation

FCalabria
Copy link

This will check if the content of the arrays has changed, even if the number of items displayed stays the same, and update them in that case.

@legeneek
Copy link
Owner

some points need to check:

  1. call equalArrays without this may cause error
  2. computeDisplayItems will be called frequently, should avoid heavy computation in it
  3. this component may assume the item's content will not change, the index check is used to avoid unneeded computation. if you want to track the change of item while index stays the same, simply remove the index check can work
  4. you can run 'npm run dev' to test you code

@legeneek legeneek closed this Feb 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants