palantir / blueprint

A React-based UI toolkit for the web
https://blueprintjs.com/
Apache License 2.0
20.74k stars 2.18k forks source link

NumericInput: clampValueOnBlur doesn't allow to enter more 3 decimal points #6825

Open AlexeyBogdan95 opened 5 months ago

AlexeyBogdan95 commented 5 months ago

Environment

Code Sandbox

Steps to reproduce

  1. Make a NumericInput
  2. Set minorStepSize equals to 0.0001
  3. Enter 15.4933
  4. Blur NumericInput

Actual behavior

The result is 15.493

Expected behavior

The result should be 15.4933

Possible solution

When toLocateString function, we need to increase maximumFractionDigits since default value is equal to 3. https://github.com/palantir/blueprint/blob/81dd30c56fe4c777b2b0cafc0d10b7e11484d1e2/packages/core/src/components/forms/numericInputUtils.ts#L34C63-L34C71

invliD commented 5 months ago

Could you clarify what the issue is? Your issue title is incomplete, and your actual and expected behavior are the same.

AlexeyBogdan95 commented 4 months ago

Hi @invliD. I have updated title and description.

Thanks!