fix for JSON Parse error when using dash_ag_grid and dash pages
Fixes #299.
- testing for grid destroyed before trying to get the state
@archmoj could you please have a look at this (or let us know that you don't feel you have enough context to review)?
@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.
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.
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. 😁