gristlabs_grist-core/app/client/components
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
..
AceEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
AceEditor.js (core) Add 'value' to trigger formula autocomplete 2021-07-12 15:07:16 -07:00
AceEditorCompletions.ts (core) One more phase of ACL UI revision. 2020-12-22 22:18:12 -05:00
ActionLog.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ActionLog.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Base.js (core) move client code to core 2020-10-02 13:24:21 -04:00
BaseView.js (core) Add other direction of linking by reflist 2021-08-30 17:39:15 +02:00
CellPosition.ts (core) Draft cells 2021-05-25 21:14:49 +02:00
ChartView.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ChartView.ts (core) Fix js errors when (un)summarizing underlying table of charts 2021-09-22 17:04:52 +02:00
ClientScope.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Clipboard.js (core) Add support for editing on mobile. 2021-02-03 23:10:51 -05:00
CodeEditorPanel.css (core) apply access control to code view 2021-05-27 17:52:23 -04:00
CodeEditorPanel.js (core) apply access control to code view 2021-05-27 17:52:23 -04:00
ColumnFilters.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
ColumnTransform.ts (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
Comm.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
commandList.js (core) Freezing columns on a GridView 2021-06-18 12:22:13 +02:00
commands.css (core) move client code to core 2020-10-02 13:24:21 -04:00
commands.js (core) Improve focus and keyboard shortcuts in modals. 2020-10-03 22:56:00 -04:00
CopySelection.js (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
Cursor.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
CursorMonitor.ts (core) Fixing anchor link navigation. 2021-07-23 11:02:07 +02:00
CustomView.css (core) Fix CustomView css to take full height of widget on all browsers including Safari 2020-10-06 13:18:50 -04:00
CustomView.ts (core) Initial page for custom widget 2021-08-13 23:58:25 +02:00
DetailView.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
DetailView.js (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
DocComm.ts (core) Remove a bunch of dead code 2021-07-01 18:38:21 +02:00
DocConfigTab.js (core) move client code to core 2020-10-02 13:24:21 -04:00
Drafts.ts (core) Replace time zone selector with one based on the newer autocomplete. 2021-07-23 08:02:05 -04:00
duplicatePage.ts (core) Rename page option 'Duplicate' to 'Duplicate Page', and shorten warning to be more noticeable 2021-09-10 11:25:24 -04:00
EditorMonitor.ts (core) Readonly editors 2021-06-17 19:12:16 +02:00
EmbedForm.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FieldConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
FormulaTransform.ts (core) Automatically finalize action bundles when unrelated actions/bundles come in. 2020-11-10 10:32:07 -05:00
GridView.css (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
GridView.js (core) Implement UI for trigger formulas. 2021-06-29 10:24:16 -04:00
GristDoc.css (core) move client code to core 2020-10-02 13:24:21 -04:00
GristDoc.ts (core) recursiveMoveToCursorPos with new kinds of linking involving lists 2021-09-20 23:13:24 +02:00
GristWSConnection.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
Importer.ts (core) Enable incremental imports 2021-09-16 09:15:54 -07:00
Layout.css (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
Layout.js (core) Collapse inactive view sections on mobile screens. 2021-02-09 09:17:32 -05:00
LayoutEditor.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.css (core) move client code to core 2020-10-02 13:24:21 -04:00
LayoutPreview.js (core) move client code to core 2020-10-02 13:24:21 -04:00
LinkingState.ts (core) Add other direction of linking by reflist 2021-08-30 17:39:15 +02:00
Login.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ParseOptions.ts (core) move client code to core 2020-10-02 13:24:21 -04:00
PluginScreen.ts (core) Adding import from google drive to the home screen 2021-08-05 20:46:11 +02:00
Preferences.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Printing.css (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
Printing.ts (core) Improve printing of tables, fix printing of charts, add a browser test. 2020-10-12 16:04:18 -04:00
RecordLayout.css (core) move client code to core 2020-10-02 13:24:21 -04:00
RecordLayout.js (core) Context menu for cards. 2021-06-29 15:29:56 +02:00
RecordLayoutEditor.js (core) move client code to core 2020-10-02 13:24:21 -04:00
RefSelect.js (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00
SearchBar.css (core) move client code to core 2020-10-02 13:24:21 -04:00
Selector.js (core) Configure more comprehensive eslint rules for Typescript 2021-04-26 18:54:55 -04:00
SummaryConfig.js (core) move client code to core 2020-10-02 13:24:21 -04:00
TypeConversion.ts (core) Simple localization support and currency selector. 2021-08-26 13:36:49 -07:00
TypeTransform.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UndoStack.ts (core) Add rules to eslint to better match our coding conventions. 2021-05-24 12:56:18 -04:00
UnsavedChanges.ts (core) support ?embed=true and &style=light for a clean embed experience 2020-08-14 13:34:38 -04:00
ValidationPanel.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ValidationPanel.js (core) move client code to core 2020-10-02 13:24:21 -04:00
viewCommon.css (core) Freezing columns on a GridView 2021-06-18 12:22:13 +02:00
viewCommon.js (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewConfigTab.js (core) New chart view axis conf with picker for each of X,Y and group by 2021-09-16 09:10:54 +02:00
ViewLayout.css (core) Show sigma next to summary table titles 2021-07-12 20:10:15 -07:00
ViewLayout.ts (core) Hide filter bar for inactive widget in mobile mode 2021-08-23 10:33:44 +02:00
ViewLinker.css (core) move client code to core 2020-10-02 13:24:21 -04:00
ViewPane.ts (core) Update UI for formula and column label/id in the right-side panel. 2021-03-17 01:35:56 -04:00