dash-ag-grid icon indicating copy to clipboard operation
dash-ag-grid copied to clipboard

fix for JSON Parse error when using dash_ag_grid and dash pages

Open BSd3v opened this issue 2 years ago • 4 comments

Fixes #299.

  • testing for grid destroyed before trying to get the state

BSd3v avatar May 01 '24 20:05 BSd3v

@archmoj could you please have a look at this (or let us know that you don't feel you have enough context to review)?

gvwilson avatar May 27 '24 12:05 gvwilson

@BSd3v Thanks very much for the PR. It's looking good. Could you add a test to lock down this bug from happening again?

@gvwilson I am not familiar with this repository. By looking at the list of contributors @AnnMarieW, @ndrezn and @Farkites may help approving this PR.

BTW. I was wondering perhaps this check could/should be moved to be inside getColumnState as an early return to avoid duplicates and simplify this PR as well.

archmoj avatar May 27 '24 13:05 archmoj

Hello @archmoj,

getColumnState is not something that this repository owns as it comes from the underlying AG Grid. While yes they could do a return, they provide the warning that you are calling a function against a destroyed grid.

BSd3v avatar May 27 '24 14:05 BSd3v

Hello @gvwilson this issue can crop up at any point the grid is destroyed, this doesn't just apply to when using pages. Although it's a lot easier to test when using pages. 😁

BSd3v avatar May 31 '24 12:05 BSd3v