mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Accept values entered into Reference columns showing RowIDs without waiting.
Summary: - Normally Reference columns can only be used for data entry once the target table has loaded. When it shows RowID, we shouldn't need to wait. - Also, fix pasting values between cells of a RowID-showing column. Test Plan: Added a test for entering data before data has loaded. Reviewers: paulfitz Reviewed By: paulfitz Differential Revision: https://phab.getgrist.com/D2902
This commit is contained in:
@@ -128,7 +128,12 @@ export class ReferenceEditor extends NTextEditor {
|
||||
if (matches.length > 0) {
|
||||
return matches[0].value;
|
||||
} else {
|
||||
return this.textInput.value;
|
||||
const value = this.textInput.value;
|
||||
if (this._visibleCol === 'id') {
|
||||
// If the value is a valid number (non-NaN), save as a numeric rowId; else as text.
|
||||
return +value || value;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user