-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
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
- 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. - 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" } } - Add a text column.
- Save changes.
- View list.
- Click 'Edit in grid view'.
- Make a change to the numeric column, then tab across to the text field.
- See error. That is, see the 'old' value in the numeric column.
- Click 'Exit grid view'.
- 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.