(core) Disable selection summary in previews

Summary:
This was causing an error to be thrown when a column header was
clicked in the import preview while merging.

Test Plan: Browser test.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3749
pull/468/head
George Gevoian 1 year ago
parent 7ef3c92b51
commit 17836031c5

@ -84,8 +84,13 @@ function GridView(gristDoc, viewSectionModel, isPreview = false) {
this.isScrolledTop = this.autoDispose(ko.computed(() => this.scrollTop() > 0));
this.cellSelector = selector.CellSelector.create(this, this);
this.selectionSummary = SelectionSummary.create(this,
this.cellSelector, this.tableModel.tableData, this.sortedRows, this.viewSection.viewFields);
if (!isPreview) {
// Disable summaries in import previews, for now.
this.selectionSummary = SelectionSummary.create(this,
this.cellSelector, this.tableModel.tableData, this.sortedRows, this.viewSection.viewFields);
}
this.colMenuTargets = {}; // Reference from column ref to its menu target dom
this.selectedColumns = this.autoDispose(ko.pureComputed(() => {

Loading…
Cancel
Save