mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Fixing click-away bug for the cell color widget
Summary: After introducing multi columns operation, color picker could save a cell style for a wrong column, if the save operation was triggered by user clicking on one of the cells. Test Plan: Updated Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3668
This commit is contained in:
@@ -199,7 +199,10 @@ export class RightPanel extends Disposable {
|
||||
}));
|
||||
|
||||
owner.autoDispose(selectedColumns.subscribe(cols => {
|
||||
this._gristDoc.viewModel.activeSection()?.selectedFields(cols || []);
|
||||
if (owner.isDisposed() || this._gristDoc.isDisposed() || this._gristDoc.viewModel.isDisposed()) { return; }
|
||||
const section = this._gristDoc.viewModel.activeSection();
|
||||
if (!section || section.isDisposed()) { return; }
|
||||
section.selectedFields(cols || []);
|
||||
}));
|
||||
this._gristDoc.viewModel.activeSection()?.selectedFields(selectedColumns.peek() || []);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user