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

creating `customSetProps` to handle `setProps`

Open BSd3v opened this issue 1 year ago • 2 comments

creating customSetProps to handle setProps when component no longer in dash tree

BSd3v avatar Oct 07 '24 16:10 BSd3v

Is there a specific issue that this change resolves?

ndrezn avatar Oct 09 '24 13:10 ndrezn

There are a couple of cases that lead to this:

  • when a component is removed entirely, as in a page container removes the element or removed as a child from a dom (eg test_cs002_column_state)
    • this leads to setProps from internal component updates not merging with the grid component in dash and results in a dash renderer error for passing an object to an expected component
  • when a component is unmounted and the underlying grid can no longer perform actions, this pertains to updates when no longer in the DOM tree (eg tabs that dont keep the component in the DOM)
    • this leads to an error inside the component where the state (mounted) and props are out of sync and it tries to apply changes to the grid even though it is currently unmounted. Often seen as JS errors.

BSd3v avatar Oct 09 '24 14:10 BSd3v

@T4rk1n can you please have a look at this? Once it is reviewed and merged, @BSd3v can do a new dash-ag-grid release.

gvwilson avatar Oct 31 '24 19:10 gvwilson

Thanks @T4rk1n - @BSd3v please go ahead and push the button.

gvwilson avatar Nov 01 '24 14:11 gvwilson