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

List doesn't re-render on sorting of the data. #34

Closed
kakadiadarpan opened this issue Nov 29, 2017 · 2 comments
Closed

List doesn't re-render on sorting of the data. #34

kakadiadarpan opened this issue Nov 29, 2017 · 2 comments

Comments

@kakadiadarpan
Copy link
Contributor

I'm using react-tiny-virtual-list to show a list which can be sorted. On sorting the data, there is no effect on the rendered list. But when I scroll, the list gets re-rendered.

@clauderic
Copy link
Owner

List uses PureComponent, so it only update when it's props change. You can force it to re-render by calling forceUpdate on it or by passing it an extra prop that will change every time your data changes.

@kakadiadarpan
Copy link
Contributor Author

kakadiadarpan commented Dec 4, 2017

@clauderic Thanks for the info. I think this is something that should be there in the documentation.

This issue was closed.
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

No branches or pull requests

2 participants