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
Describe the bug
I'm designing a component named Select featuring a list of options that the user can select/unselect. I'm basically using useArgs to sync its prop value (which contains the array of selected elements) with a check control.
Changing the value by checking checkboxes in the control correctly affects the component, but not the other way around. Shouldn't selecting options in my component also check them in the control, if I'm not mistaken? The picture below sums up the issue.
To Reproduce
I feel like the problem is simple enough to reproduce with the template above. I'm using version 6.5.9, but I do not think it has been addressed in more recent versions of storybook.
Additional context
This looks VERY similar to issue n°15924 for Number controls, therefore I tried to implement a solution similar to commit n°17247 in controls/options/Checkbox.js, but unfortunately couldn't make it work: it looks like the Checkbox component properties aren't updated when the state of the component changes, as Checkbox does not even appear to be trying to rerender.
The text was updated successfully, but these errors were encountered:
Describe the bug
I'm designing a component named
Select
featuring a list of options that the user can select/unselect. I'm basically usinguseArgs
to sync its propvalue
(which contains the array of selected elements) with acheck
control.Changing the value by checking checkboxes in the control correctly affects the component, but not the other way around. Shouldn't selecting options in my component also check them in the control, if I'm not mistaken? The picture below sums up the issue.
To Reproduce
I feel like the problem is simple enough to reproduce with the template above. I'm using version 6.5.9, but I do not think it has been addressed in more recent versions of storybook.
System
Additional context
This looks VERY similar to issue n°15924 for
Number
controls, therefore I tried to implement a solution similar to commit n°17247 incontrols/options/Checkbox.js
, but unfortunately couldn't make it work: it looks like theCheckbox
component properties aren't updated when the state of the component changes, asCheckbox
does not even appear to be trying to rerender.The text was updated successfully, but these errors were encountered: