plotly / dash-ag-grid

Dash AG Grid is a high-performance and highly customizable component that wraps AG Grid, designed for creating rich datagrids.
https://dash.plotly.com/dash-ag-grid
MIT License
170 stars 24 forks source link

JSON Parse error when using dash_ag_grid and dash pages #299

Open l0uden opened 4 months ago

l0uden commented 4 months ago
dash                           2.16.1
dash_ag_grid                   31.0.1
dash-bootstrap-components      1.5.0
dash-core-components           2.0.0
dash-html-components           2.0.0
dash-mantine-components        0.12.1
dash-table                     5.0.0
dash-testing-stub              0.0.2

Description

Set up two dash pages. One should contain dash_ag_grid. Run the app, open the page with dash_ag_grid and quickly (in 1 second) switch to different page. Next error occurs in browser console:

SyntaxError: JSON Parse error: Unexpected identifier "undefined"

Expected behavior

No console error occurred

Screenshots

image
AnnMarieW commented 4 months ago

Hi @l0uden Thank you for reporting the issue. I was able to reproduce the error. This appears to be a problem with dash-ag-grid and will likely be transferred there for further investigation.

I also noticed this error message:

ag-grid-community.auto.esm.js:438 AG Grid: Grid API function getColumnState() cannot be called as the grid has been destroyed. It is recommended to remove local references to the grid api. Alternatively, check gridApi.isDestroyed() to avoid calling methods against a destroyed grid. To run logic when the grid is about to be destroyed use the gridPreDestroy event. See: See https://www.ag-grid.com/react-data-grid/grid-lifecycle/#grid-pre-destroyed value @ ag-grid-community.auto.esm.js:438