(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
This commit is contained in:
George Gevoian 2024-03-29 15:20:02 -07:00
parent 4736ca490c
commit b505d21e79

View File

@ -2009,7 +2009,10 @@ GridView.prototype._getCellContextMenuOptions = function() {
this.getSelection().onlyAddRowSelected()
),
disableMakeHeadersFromRow: Boolean(
this.gristDoc.isReadonly.get() || this.getSelection().rowIds.length !== 1 || this.getSelection().onlyAddRowSelected()
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,