polaris
polaris copied to clipboard
TextField maxLength property does not work for number type
Issue summary
When using the TextField
component, the maxLength
property does not work when the type
property is set to number
.
Expected behavior
Behavior should be the same for all type
s. A maxLength
of 3 with the type
set to number should not allow the input of 1234
.
Actual behavior
There is no limit to the amount of numbers that can be input.
Steps to reproduce the problem
<TextField
label="Type a number"
value={value}
onChange={handleChange}
maxLength={3}
type="number"
showCharacterCount={true}
/>
👋 Thanks for opening your first issue. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines.
same issue
This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action. → If there's no activity within a week, then a bot will automatically close this. Thanks for helping to improve Shopify's design system and dev experience.
This is still an issue.