-
Notifications
You must be signed in to change notification settings - Fork 35
Programatically changing the state to select all values does not set the select all checkbox #92
Comments
@wlamnz Thanks for the report. I'll take a look later. |
With objects as options the equality check was goosed. Now use the object value so we dont have to do a deep equality check fix #92
With objects as options the equality check was goosed. Now use the object value so we dont have to do a deep equality check fix #92
🎉 This issue has been resolved in version 4.1.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@Aidurber Thanks for your quick effort. However, I just tested the issue on 4.1.1 and I still seem to have the same problem. The Select all checkbox is still not being set once all the values in the dropdown are set. https://codesandbox.io/s/5w2yq84xql (4.1.1 version) Clicking the Select button at the top to programmatically set the Item 1 and Item 2 value still does not set the Select all checkbox. Note: this version is definitely better in a sense that toggling any of the Item values (i.e. Item 1 or Item 2 from the example) will set the Select all, which the previous version did not. |
😕 I had it working correctly and even wrote tests around it. Back to the drawing board! |
Hi @wlamnz, I figured it out. The codesandbox you sent was using React and React-DOM Picky has a dependency on React > If you're using 16.0.0 in your app you might want to consider bumping to 16.3.0 or higher. There are no breaking changes. |
Ah, that makes a lot sense. Thanks for that! |
Version
4.1.0
Here's what went wrong:
Seems like there is a synchronization issue where if the state is changed to select all values, the 'Select all' button (if enabled) is not checked.
See here to reproduce the bug:
https://codesandbox.io/s/9351z3moqr
The text was updated successfully, but these errors were encountered: