From 5b031b8d8426f9c987621892a7d0696ba8b1d168 Mon Sep 17 00:00:00 2001 From: Louis Delbosc Date: Thu, 26 Jan 2023 18:08:44 +0100 Subject: [PATCH] Change link to reference new when rowId is null --- app/client/components/BaseView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/components/BaseView.js b/app/client/components/BaseView.js index 8d63d79f..bba84c5d 100644 --- a/app/client/components/BaseView.js +++ b/app/client/components/BaseView.js @@ -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(() => {