You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue only applies to the latest version (30.3). It is mostly a follow-up to #4132, which has been resolved 🎉 , but introduced a small issue as part of the main fix.
Issue
The new issue I have observed is that the options arg passed to onChange and searchProps.onChange differ. While onChange receives the latest state, searchProps.onChange receives the old state (meaning the checked value for the item that was clicked on is out of date).
I created a sandbox to show the issue. The issue in this sandbox can be seen by checking the console, and comparing the values shown for the two callbacks.
Secondary request
A secondary request, is that it would be nice to pass the visible options as an array (instead of an object), so that it matches the "top level" onChange. That's not a blocking issue for me though, and appreciate it might be a hassle to change.
The text was updated successfully, but these errors were encountered:
We'd be happy to have you contribute! I think you are correct on both points: searchProps.onChange should use the updated state value, and the first parameter should be an array (a little confused why TypeScript didn't catch this).
Opened a PR to fix the issue: #4292, and another to try to avoid prop conflicts moving forward within this component: #4291. LMK what you think. Thanks!
This issue only applies to the latest version (30.3). It is mostly a follow-up to #4132, which has been resolved 🎉 , but introduced a small issue as part of the main fix.
Issue
The new issue I have observed is that the
options
arg passed toonChange
andsearchProps.onChange
differ. WhileonChange
receives the latest state,searchProps.onChange
receives the old state (meaning thechecked
value for the item that was clicked on is out of date).I created a sandbox to show the issue. The issue in this sandbox can be seen by checking the console, and comparing the values shown for the two callbacks.
Secondary request
A secondary request, is that it would be nice to pass the visible options as an array (instead of an object), so that it matches the "top level"
onChange
. That's not a blocking issue for me though, and appreciate it might be a hassle to change.The text was updated successfully, but these errors were encountered: