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

ListView select not working #251

Closed
1 of 3 tasks
thespooler opened this issue Mar 9, 2019 · 6 comments
Closed
1 of 3 tasks

ListView select not working #251

thespooler opened this issue Mar 9, 2019 · 6 comments
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Milestone

Comments

@thespooler
Copy link
Contributor

thespooler commented Mar 9, 2019

Category

  • Enhancement
  • Bug
  • Question

Version

1.12.0

Expected / Desired Behavior / Question

When putting a ListView inside a React Component that controls its items and selection props, an item should be selectable.

Observed Behavior

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().

Steps to Reproduce

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

@thespooler
Copy link
Contributor Author

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.

@jchilde
Copy link

jchilde commented Jan 23, 2021

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.

@thespooler
Copy link
Contributor Author

If this PR goes through, that should fix this issue.
This isn't perfect, but now at least, it should basically work.

@AJIXuMuK
Copy link
Collaborator

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.

@AJIXuMuK AJIXuMuK added this to the 2.5.0 milestone Jan 28, 2021
@AJIXuMuK AJIXuMuK added status:fixed-next-drop Issue will be fixed in upcoming release. type:bug labels Jan 28, 2021
@thespooler
Copy link
Contributor Author

Fantastic!

@estruyf estruyf mentioned this issue Mar 2, 2021
@AJIXuMuK
Copy link
Collaborator

AJIXuMuK commented Mar 2, 2021

v2.5.0 has been released.

@AJIXuMuK AJIXuMuK closed this as completed Mar 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:fixed-next-drop Issue will be fixed in upcoming release. type:bug
Projects
None yet
Development

No branches or pull requests

3 participants