Closed grumpykiwi closed 10 months ago
Hi,
Please see https://github.com/microsoft/fluentui-blazor/issues/209 and try the suggestions mentioned there
Hi
I discovered that article earlier and tried the suggested fixes.
Adding name to component - failed Setting Step="any" - failed
Back in July, user LuohuaRain mentioned this:
"One of the issues I encountered while working with FluentNumberField is that it does not integrate well with EditForm. A possible solution is to use instead, works fine with EditForm and decimal value."
He doesn't mention what he used as a possible solution.
Open to ideas. This is pretty critical to my timesheet application unfortunately as the field involved is to enter time spent on a client billable project. Billing clients is our bread and butter.
Thanks
Mark
Mark,
I will take another look at this later.
Also, I would strongly recommend you to not use a number input for anything other than a simple up/down integer input. Browsers are notoriously bad in supporting this type of input. It's not just me saying that. See also https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/ and lots of other references.
Very interesting article. I will use the recommended approach. It would have been nice to use the min/max/step stuff but I will might look at doing that with JS or something. Or maybe go read the Chris Sainty article about rolling my own component.
Thanks for the feedback.
Is it possible to use inputmode and pattern with a FluentTextField? Trying to avoid hacking away at the CSS of an tag to try and make it look the same as the fluent controls on the page
Pattern is being supported and set on the input element created by the web component. Unfortunately the inputmode is not set
I have an issue with the FluentNumberField when using the arrow keys to step a number to an allowed value. On submit, the form insists the number is invalid and gives me the error message "Please enter a valid value"
If I submit a value of 8.5 it fails. If I step to a whole number it works.