ghiscoding / slickgrid-react

Slickgrid-React is a wrapper of the lightning fast & customizable SlickGrid datagrid, it also includes multiple Styling Themes
https://ghiscoding.github.io/slickgrid-react/
MIT License
31 stars 9 forks source link

gridHeight option updates not reflecting after initial render #380

Closed hwlv closed 1 month ago

hwlv commented 1 month ago

Describe the bug

  1. Set the initial gridHeight option: <SlickGrid options={{ gridHeight: 500, // Initial height is set to 500px ... }} ... />
  2. Dynamically update the gridHeight option to a different value: setOptions({ gridHeight: 600, // Attempt to change height to 600px ... }); The grid height does not update to the new gridHeight value after the initial render.

Reproduction

  1. Set the initial gridHeight option: <SlickGrid options={{ gridHeight: 500, // Initial height is set to 500px ... }} ... />
  2. Dynamically update the gridHeight option to a different value: setOptions({ gridHeight: 600, // Attempt to change height to 600px ... }); The grid height does not update to the new gridHeight value after the initial render.

Expectation

No response

Environment Info

Browser

Validations

ghiscoding commented 1 month ago

No that is incorrect, gridHeight and gridWidth are only used for the initial page load. If you want to change the grid sizes, you need to use the Resizer Service this.reactGrid.resizerService.resizeGrid(0, { height: 900, width: 900 });

You should also consult the docs, you can find this exact answer in here: Resize the Grid with fixed Dimensions

Please stop opening issues when they are in fact only questions. I already mentioned you that you should think about using Stack Overflow of open a Discussion when you only have questions.