Skip to content

ListItemPicker : when props are updated the selected items are always reset event if it should not #2008

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

Open
PierreBiname opened this issue Jun 4, 2025 · 1 comment

Comments

@PierreBiname
Copy link

Category

[ ] Enhancement

[X] Bug

[ ] Question

Version

3.21.0

Expected / Desired Behavior / Question

When props are updated, this.state.selectedItems is erased evetn if it shoud not.

Observed Behavior

If a property the disabled is updated from true to false, all items are shown in the suggested list even the those from defaultSelectedItems.

Steps to Reproduce

Create the picker with default values and with the disabled property set to true. The update the property disabled to false.

Submission Guidelines

In the file ListItemPicker.tsx in the function UNSAFE_componentWillReceiveProps replace the first line
let newSelectedItems: any[] | undefined; by let newSelectedItems = this.state.selectedItems;

Copy link

github-actions bot commented Jun 4, 2025

Thank you for submitting your first issue to this project.

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

1 participant