Using MUI textfield is somewhat annoying, since using type='number' allows a bunch of non strictly numbers, like e,-, which has traditionally been hard to parse.
For TextFieldLazy, need to pass in a regex prop that facilities this behaviour, or create a separate component for handling number inputs, like NumberInputLazy(might be easier to migrate to Number Input once MUI team releases it).
Using MUI textfield is somewhat annoying, since using
type='number'
allows a bunch of non strictly numbers, likee,-
, which has traditionally been hard to parse.MUI team advices against using this as well: https://mui.com/material-ui/react-text-field/#type-quot-number-quot
Handling for numeric inputs should follow more like this example: https://codesandbox.io/p/sandbox/https-github-com-mui-material-ui-issues-36415-orxx4r?file=%2Fsrc%2FApp.tsx
For TextFieldLazy, need to pass in a
regex
prop that facilities this behaviour, or create a separate component for handling number inputs, likeNumberInputLazy
(might be easier to migrate to Number Input once MUI team releases it).