Skip to content

Edit in grid view: column formatting overrides change in numeric cell value. Original value displayed until Exit grid view selected #6531

@PatrickWilliamson

Description

@PatrickWilliamson

Category

  • Bug

Describe the bug

I have a list containing a number of columns, most are read-only, and almost all of which use formatting to change the background colour.

Most read/write columns are numeric, but for all of these, typing a new value simply redisplays the old value. Tabbing back into the field still shows the old value. It is only when exiting grid view (or moving to edit a row other than the current one) that the new value is displayed.

If I remove the column formatting, the values remain as typed. That is, the value 'sticks' and is displayed instantly, correctly, without any need to exit grid view nor move to a different row.

NOTE. This seems to be a problem only for numeric fields. I have a multi-line text column into which I've copied the formatting from the numeric columns: it works properly. That is, newly-typed values are displayed when the cell is vacated.

Steps to reproduce

  1. Create a list with a numeric column
    Type: Number
    Required: Yes
    Enforce unique: No
    Min and Max left empty
    Number of decimals places: 1
    Default value: 0
    Please note: I have tried leaving default value empty, but it makes no difference.
  2. Paste the following into the column formatting section:
    { "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json", "elmType": "div", "txtContent": "@currentField", "style": { "background-color": "#ffcff1" } }
  3. Add a text column.
  4. Save changes.
  5. View list.
  6. Click 'Edit in grid view'.
  7. Make a change to the numeric column, then tab across to the text field.
  8. See error. That is, see the 'old' value in the numeric column.
  9. Click 'Exit grid view'.
  10. After briefly displaying the new value, the old value is redisplayed, then the new value is finally displayed.

Expected behavior

Values typed into numeric columns should 'stick' and be visible instantly, as per all other column types.

Environment details (development & target environment)

Windows 10
SharePoint Online
Firefox 82.0.3
Chrome 86.0.4240.198

Standard, OOTB SharePoint list

Additional context

We are relatively new to using column formatting so it may be that this issue has existed for some time.

It's an absolute show-stopper for our users as this list is intended for use when setting forecasts for the next three years; we simply can't have users exiting quick edit, or bouncing down a row then back up, before they can see the values they entered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:list-formattingCategory: View, row & column formatting with JSONstatus:trackedCurrently tracked with Microsoft’s internal issue tracking system. DO NOT ADD/REMOVE (MSFT managed)type:archive-old-issueIssues which are closed as tool old for active worktype:questionQuestion... if answered, will be tagged as such.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions