revolist / revogrid

Powerful virtual data grid smartsheet with advanced customization. Best features from excel plus incredible performance 🔋
https://revolist.github.io/revogrid
MIT License
2.68k stars 167 forks source link

Auto size feature is not working #423

Closed dmitri-vlasov closed 10 months ago

dmitri-vlasov commented 10 months ago

First, thanks for great library!

Describe the issue Auto size feature is not working - applying any of the parameters listed here https://revolist.github.io/revogrid/guide/autosize.html#column-autosize not affecting the column width - the text is cut and hidden and column width is not changed according to text.

Please see here: https://codesandbox.io/s/revo-grid-vanilla-js-forked-htt7mj?file=/src/index.js

To Reproduce

  1. Create a revs-grid and add a test data with long text in cells;
  2. add any of parameters like from here like :
grid.autoSizeColumn = {
  mode: "autoSizeAll"
};

See an example: https://codesandbox.io/s/revo-grid-vanilla-js-forked-htt7mj?file=/src/index.js:617-665

dmitri-vlasov commented 10 months ago

For all who stuck with the same. It worked with the following config:

grid.autoSizeColumn = { mode: 'autoSizeAll', allColumns: true };

Closing the issue, nothing to fix actually.

dmitri-vlasov commented 10 months ago

Forgot to mention - I also added grid.rowHeaders to make it work.