Components: support step="any"
in NumberControl
and RangeControl
#34816
Labels
[Feature] Component System
WordPress component system
[Package] Components
/packages/components
[Type] Enhancement
A suggestion for improvement.
What
Accept
any
as a valid value for thestep
prop of theNumberControl
andRangeControl
componentsWhy
The
input[type=number]
andinput[type=range]
HTML elements supportany
as a value for thestep
attribute (#, #).NumberControl
andRangeControl
aim at being a superset of these components, and should therefore support thestep="any"
case. Currently, this is not supported and causes the value of the inputs to becomeNaN
Also, partially related: #33156
A/C
step="any"
toNumberControl
andRangeControl
, following the expected behaviour from the HTML specstep
prop docs in both components README:number | "any"
@wordpress/components
packageThe text was updated successfully, but these errors were encountered: