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

Cannot use both `alignedGrids` and `initialState` with React

Open nddery opened this issue 4 months ago • 0 comments

I'm submitting a bug report.

[x] bug report => see 'Providing a Reproducible Scenario'
[] feature request => do not use Github for feature requests, see 'Customers of AG Grid'
[] support request => see 'Requesting Community Support'

Current behavior When using React (I've not tested with Angular and Vue), using aligned grids along with initial state leads to a TypeError:

Cannot read properties of undefined (reading 'isVerticalScrollShowing')

See this here: codesandbox.

Setting initialState on a single grid "resolves" the bug, but the state is not applied to the other aligned grids.

Note that this seems to work fine when using vanilla JavaScript: https://codesandbox.io/p/sandbox/aligned-grids-forked-t6263j?file=%2Fmain.ts%3A66%2C5

Expected behavior

I would expect to be able to use the aligned grids and initial state features together without any errors being throw.

Please tell us about your environment:

  • AG Grid version: 32.2.2

  • Browser: Chrome 129.0.6668.90

'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36'

  • Language: React

nddery avatar Oct 16 '24 19:10 nddery