New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix TextField parse functionality #3824
Conversation
⛔ Feature branch deployment currently inactive.If the PR is still open, you can add the |
98cfb4a
to
7ff3553
Compare
7ff3553
to
24bde97
Compare
24bde97
to
f9a0b99
Compare
f9a0b99
to
c7fb3b6
Compare
I cannot reproduce your bug. |
In Chrome on the Mac, I have to enter the numbers with a comma, which doesn't make sense because I have set the region to Switzerland, so it should use the dot to indicate the decimal point. Just the problem on the Mac is poor UX for Swiss users. On mobile Safari on iOS it is currently impossible to enter decimal numbers, which is really bad.
I think it is better to let users type in a field and and then show a parse error, than to just not "allow" decimal numbers for some users. (Because a Swiss user would never expect a decimal to be formatted with a comma) Maybe in the future we can provide German parsing (with a comma) but until then, I would suggest we focus on our Swiss userbase. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@usu can you test again? I could not reproduce your problem. |
Seems to work now. Couldn't reproduce either |
I've corrected the way we handle numbers in our
e-textfield
andapi-textfield
. Currently this transformation is done at the wrong place. Forv-model
we can use the.number
modifier to get a number. For theapi-textfield
I've implemented a parse function, that parses the value if attribute type="number" or inputmode="numeric" is set.Currently in the MaterialTable it was not possible to have fraction numbers (1.2 kg Mehl). With this change it is now possible to input these values. On mobile the number keyboard is shown if you set
inputmode="numeric"
.