ToggleGroupControlAsRadioGroup
value is always undefined
#56667
Labels
[Package] Components
/packages/components
[Type] Regression
Related to a regression in the latest release
Description
The
ChildLayoutControl
has an effect that runs only on first mount, and resets the value of the control if in incorrect combination of attributes is detected. It then passes that value toToggleGroupControl
.The problem is that
ToggleGroupControlAsRadioGroup
insideToggleGroupControl
never re-renders after the value changes. Looking into it a bit, it seems that this happens due to the effect inuseComputeControlledOrUncontrolledValue
running after the code beneath it, so that the component returns its original value as it the effect had never run.This regression seems to have been introduced in #50278, which made its way into WP 6.4. The
ToggleGroupControl
was working correctly in previous releases.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: