gristlabs_grist-core/app/client
Cyprien P 33f056a187 (core) Fix js errors when (un)summarizing underlying table of charts
Summary:
Used to throw js errors: `Resize must be passed a displayed plot div element.`

Summarizing (or unsummarizing) causes the ChartView view instance to
be replace by a new one in the view layout.
However, the problem is that the old view instance get disposed only
after the new view instance is added to the view layout.
This causes the old view layout to try to resize chart while chart dom
has been removed from the dom (which Plotly does not support).

This diff fixes it by checking the the chart dom elemnt is still in
the dom before making the plotly call to resize the chart.

TODO: It feels weird that the old view instance gets disposed after
the new one get added. Maybe we should check that also.

Test Plan: New test added.

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3035
2021-09-22 17:04:52 +02:00
..
aclui (core) tweak description of FullCopies special permission 2021-07-30 06:18:41 -04:00
components (core) Fix js errors when (un)summarizing underlying table of charts 2021-09-22 17:04:52 +02:00
lib (core) Disable mousedown on token delete button 2021-09-16 10:45:06 -07:00
models (core) add tests for site deletion 2021-09-14 10:03:18 -04:00
ui (core) In make-copy dialog, ensure it's non-saveable while fetching workspaces after a switch of the destination org 2021-09-20 11:54:06 -04:00
ui2018 (core) Get first unicode character (e.g. 📝 ) for page label, not 1st byte 2021-09-17 12:59:53 +02:00
widgets (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
app.css (core) Make mobile the default mode. 2021-02-25 11:31:43 -05:00
app.js (core) Avoid loading the Grist frontend app more than once. 2021-09-07 16:40:40 -04:00
declarations.d.ts (core) Port LinkingState.js to TypeScript 2021-08-26 15:10:34 +02:00
errorMain.ts (core) clean up a collection of small problems affecting grist-core 2021-08-17 21:44:50 -04:00
exposeModulesForTests.js (core) Some cleanup: remove old unused modules. 2020-11-20 11:23:20 -05:00
logo.css (core) Cleanup removing some old unused files, fixing logo.css, and removing #grist-app. 2020-10-09 17:04:09 -04:00
tsconfig.json freshen app/client/ui2018/cssVars.ts 2020-06-23 16:16:38 -04:00