RangeControl: Reset button isn't disabled when expected #63061
Labels
[Package] Components
/packages/components
[Status] In Progress
Tracking issues with work in progress
[Type] Bug
An existing feature does not function as intended
The reset button when
allowReset={ true }
is not disabled when the value cannot be reset anymore.For example in this story, with
initialPosition={ 50 }
:CleanShot.2024-07-02.at.23.47.02-converted.mp4
The disable logic looks wrong, because
value
isnumber | null
and will never beundefined
:gutenberg/packages/components/src/range-control/index.tsx
Line 329 in c56aa97
There should probably be some consolidation with the
handleOnReset
logic, so that the reset button will be disabled when theresetValue
isnull
:gutenberg/packages/components/src/range-control/index.tsx
Lines 168 to 173 in c56aa97
The text was updated successfully, but these errors were encountered: