Skip to content

Number formatting #215

Open
Open
@andrejhronco

Description

@andrejhronco

Hi,
Thank you for your work on this great package.

I'm displaying floats in the Number element and I would like 1 to display as 1.00.
Since the value is a string, that formatting shouldn't be an issue in JS.

is there a formatting function that I could pass in?
format={(value) => value.toFixed(2)}

also would be useful for displaying units
format={(value) => `${value}ms`}

Appreciate any advice.

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