hoist-react icon indicating copy to clipboard operation
hoist-react copied to clipboard

`Grid.agOptions` prop is not reactive

Open ghsolomon opened this issue 9 months ago • 0 comments

Currently, agOptions provided to aGrid component via props are read and cached when the component first mounts. This is unintuitive, since typically components react to observable prop changes.

For example, in a client-app, users are presented with an input to toggle the domLayout prop between normal and autoHeight; however, in order to actually achieve this, theGrid needs to be remounted to force the agOptions to be read again.

A couple possible solution:

  1. Stop caching agOptions so they are reactive like most other props. (We could do this by making agOptions a computed getter on GridLocalModel.)
  2. Make agOptions a readonly property of GridModel to more clearly communicate its immutability (does not solve the application issue described above)

ghsolomon avatar May 09 '24 18:05 ghsolomon