1.12.0
When putting a ListView inside a React Component that controls its items and selection props, an item should be selectable.
When putting a ListView inside a React Component, anything that trigger componentDidUpdate, like setState or a prop change, will cause an invalidation of the items selection and cause an invalid call to props.selection().
Call setState on a component containing a ListView with a selected item and watch the selection disapear.
Handy reproduction: https://github.com/thespooler/listview-bughunt
I would suspect that using isEqual in componentDidUpdate might not behave in the expected way. If the select() function is bound in render(), as lodash does strict equality comparison on functions, it likely will always return false.
Any update on this bug. It prevents anything beyond creating samples - no real world application for this control is possible beyond just displaying list data.
If this PR goes through, that should fix this issue.
This isn't perfect, but now at least, it should basically work.
Hi @thespooler, @jchilde
The fix has been merged and will be included in the next release.
In a meanwhile you can test the functionality in beta version.
Fantastic!
v2.5.0 has been released.
Most helpful comment
v2.5.0has been released.