(core) Use correct empty value in ChoiceEditor.getCellValue

Summary:
The default value of Choice columns is empty string, but ChoiceEditor was
saving nulls whenever a blank value was saved. This was causing unexpected
updates to trigger values due to the cell value changing internally, even
though null and empty string appear the same in the UI.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4242
This commit is contained in:
George Gevoian
2024-04-29 17:05:07 -04:00
parent 87c0c5153d
commit 50af681f47
2 changed files with 55 additions and 1 deletions

View File

@@ -77,7 +77,7 @@ ChoiceEditor.prototype.getCellValue = function() {
if (selectedItem) {
return selectedItem.label;
} else if (this.textInput.value.trim() === '') {
return null;
return '';
} else {
return TextEditor.prototype.getCellValue.call(this);
}