From b505d21e79cb85bd56c7ff90a025acbb01b453d6 Mon Sep 17 00:00:00 2001 From: George Gevoian Date: Fri, 29 Mar 2024 15:20:02 -0700 Subject: [PATCH] (core) Disable headers shortcut in summary tables Summary: Summary tables have restrictions on which columns can be renamed. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Subscribers: jarek Differential Revision: https://phab.getgrist.com/D4222 --- app/client/components/GridView.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/client/components/GridView.js b/app/client/components/GridView.js index 73970b2b..184f7375 100644 --- a/app/client/components/GridView.js +++ b/app/client/components/GridView.js @@ -2008,8 +2008,11 @@ GridView.prototype._getCellContextMenuOptions = function() { this.viewSection.disableAddRemoveRows() || this.getSelection().onlyAddRowSelected() ), - disableMakeHeadersFromRow: Boolean ( - this.gristDoc.isReadonly.get() || this.getSelection().rowIds.length !== 1 || this.getSelection().onlyAddRowSelected() + disableMakeHeadersFromRow: Boolean( + this.gristDoc.isReadonly.get() || + this.getSelection().rowIds.length !== 1 || + this.getSelection().onlyAddRowSelected() || + this.viewSection.table().summarySourceTable() !== 0 ), isViewSorted: this.viewSection.activeSortSpec.peek().length > 0, numRows: this.getSelection().rowIds.length,