ui icon indicating copy to clipboard operation
ui copied to clipboard

[InputNumber] Allow non-rounded numbers without `step="0.01"`

Open GreenmeisterDavid opened this issue 11 months ago • 4 comments

Description

Currently if we want to allow non-rounded numbers (like 1.23) to be entered in UNumberInput, we need to set it to step="0.01". This however also changes the behavior of the +/-buttons. It would be awesome to be able to have separate controls for this - or have the format-options-prop control round/non-rounded numbers.

Additional context

No response

GreenmeisterDavid avatar Jan 16 '25 13:01 GreenmeisterDavid

@GreenmeisterDavid Basically, if I understand correctly, you'd like us to be able to enter the input 1.23 and still be able to increase, for example, from 1 to 1?

HugoRCD avatar Jan 19 '25 15:01 HugoRCD

Exactly! Especially for accountancy-clients, I often get this request from end users. 90% of the time they want to click the amount from 0 to lets say 3, but every so often they want to be able to input something like 2.5 (using the keyboard). Might be a bit niche tho?

GreenmeisterDavid avatar Jan 20 '25 09:01 GreenmeisterDavid

No, not necessarily. I can see how it could be useful, but I think it's more a suggestion to make on the RekaUI repo, since we're "wrapping" existing Reka functionality 🤔

HugoRCD avatar Jan 20 '25 09:01 HugoRCD

I see there is a stepSnapping option, but I tried setting step=5 and stepSnapping=false and its not working, it always round to the step setting

manuel-84 avatar Apr 03 '25 08:04 manuel-84