Open BeeMargarida opened 1 year ago
Looks like this is already done?
It's not, this happens when we change the state inside (like toggling the checked) and then we try to change outside. There's an example of the problematic behaviour here: https://discord.com/channels/954790377754337280/1109187255903453245/1109442589138100335
I dont believe this is an issue with the component, as the same logic applied to a checkbox yields the same result. We need to research createEventForwarder
and see why the checked
closure isn't passing through.
Yes, it yields the same issue, but we want it to be possible to override the "state" when changing the prop, even if we changed it internally.
It should be possible to make the
checked
prop ofChip
component (and other similar components) controlled. This means that it keeps an internal state or updates based on changes in the external state, that is passed down by changing the prop value.