From 24c57e05d702ee200b62b0f187a2e52aba7d6926 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaros=C5=82aw=20Sadzi=C5=84ski?= Date: Wed, 29 Dec 2021 21:46:27 +0100 Subject: [PATCH] (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 --- app/client/components/GridView.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/components/GridView.js b/app/client/components/GridView.js index 50bc84ad..2e60ad19 100644 --- a/app/client/components/GridView.js +++ b/app/client/components/GridView.js @@ -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.