hoist-react
hoist-react copied to clipboard
`Grid.agOptions` prop is not reactive
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:
- Stop caching
agOptions
so they are reactive like most other props. (We could do this by makingagOptions
acomputed
getter onGridLocalModel
.) - Make
agOptions
areadonly
property ofGridModel
to more clearly communicate its immutability (does not solve the application issue described above)