-
Notifications
You must be signed in to change notification settings - Fork 602
Dynamically loaded content messes with display #88
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
Comments
Sorry, I can't quite understand |
Here is a code sandbox example If you use the selectbox and select "two" it renders a list of 2 items. If you select "one" again, it doesn't go back to the 7 items. It just renders the first 2 items in the list. I managed to fix it by adding a ref="list" to the virtual list and doing |
I have reproduced it, thanks for reporting this. |
I think the problem is if the number of remain plus the number of bench is greater than the data items, it will not re-render the list. I hot fix it by checking the size of the items is smaller than (remain + bench) and call forceUpdate if the condition is true. Here is the hot fix example: |
@cchuang6 almost that, but vitrual-list shoud handle it itself, I will fix it in next version. |
Fixed and publish by But when change new list data, render zone |
I have a list of items that dynamically re-renders based on a filter (it retrieves the data back from an API). When the list is small (e.g. 7 items in my case) and the filter brings back 1 item, going back to the 7 items list only renders 1 item (a regular list doesn't have this issue).
Do you have any idea how I can fix this?
The text was updated successfully, but these errors were encountered: