(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
pull/936/head
George Gevoian 2 months ago
parent 4736ca490c
commit b505d21e79

@ -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,

Loading…
Cancel
Save