Skip to content

[NumberField] use a (higher) default for maximumFractionDigits option #10718

@ogroppo

Description

@ogroppo

Is your feature request related to a problem? Please describe.
NumberField is using, according to documentation, Intl.NumberFormat() which by mdn docs is "the default for plain number formatting is the larger of minimumFractionDigits and 3" i.e. 3
Example in Datagrid:
0.001 => 0.001
0.0001 => 0 // very confusing for user, thinking the value is 0

Describe the solution you'd like
Provide by default the maximum value for maximumFractionDigits (100) to Intl.NumberFormat so that user doesn't see 0 when the value is 0.0001

Describe alternatives you've considered
transforming manually, tedious

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions