(core) Fixing dispose bug on GridView

Summary:
When disposing a GridView (i.e. switching pages) there was JS error. It was caused, by
autodisposing knockout observable.

Test Plan: manual tests

Reviewers: georgegevoian

Reviewed By: georgegevoian

Differential Revision: https://phab.getgrist.com/D3201
This commit is contained in:
Jarosław Sadziński 2021-12-29 21:46:27 +01:00
parent 0482c83771
commit 24c57e05d7

View File

@ -190,7 +190,7 @@ function GridView(gristDoc, viewSectionModel, isPreview = false) {
}, this));
// Holds column index that is hovered, works only in full-edit formula mode.
this.hoverColumn = this.autoDispose(ko.observable(-1));
this.hoverColumn = ko.observable(-1);
// Debounced method to change current hover column, this is needed
// as mouse when moved from field to field will switch the hover-column
// observable from current index to -1 and then immediately back to current index.