Skip to content

number cell format returns incorrect value in edit mode #546

@knownasilya

Description

@knownasilya

Describe the bug
This is my definition:

  const cell: NumberCell = {
              type: 'number',
              value: (task.percentComplete ?? 0) / 100,
              format: new Intl.NumberFormat('en-US', {
                style: 'percent',
                minimumFractionDigits: 0,
                maximumFractionDigits: 0,
              }),
              nonEditable: false,
            };

When double clicking to edit the cell, I see 0.36, but in the normal view it shows 36%. I want the edit view to show 36

Current behavior
No way to change the format of the value for edit mode. Really format should have an alternative version that is just a function that returns a value.

Expected behavior
Show a different version of the value, like displayValue function or something

Screenshots or gifs

Image Image

Your environment details

  • Device: desktop
  • OS: macos
  • Browser arc (chrome)

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