Change link to reference new when rowId is null

This commit is contained in:
Louis Delbosc 2023-01-26 18:08:44 +01:00
parent a52c148786
commit 5b031b8d84

View File

@ -141,7 +141,7 @@ function BaseView(gristDoc, viewSectionModel, options) {
}).extend({deferred: true}));
// Update the cursor whenever linkedRowId() changes.
this.autoDispose(this.linkedRowId.subscribe(rowId => this.setCursorPos({rowId})));
this.autoDispose(this.linkedRowId.subscribe(rowId => this.setCursorPos({rowId: rowId || 'new'})));
// Indicated whether editing the section should be disabled given the current linking state.
this.disableEditing = this.autoDispose(ko.computed(() => {