react-table-library
react-table-library copied to clipboard
Table always take the max height of container div
Basically, even if the table has only 2 rows, all the container space will be occupied and the header + 2 rows will each be very big in height(1/3 of the container each). I'm using tree table, is there a way to prevent this or specify a fixed height for each row(and header too)?
Hello, I had the same problem. I solved it by using the custom theme. For the rows set table: grid-template-rows: 50px. And the header HeaderCell: height: 50px for example. Whether it's the perfect solution I don't know, but it works for me.
Hello, I had the same problem. I solved it by using the custom theme. For the rows set table: grid-template-rows: 50px. And the header HeaderCell: height: 50px for example. Whether it's the perfect solution I don't know, but it works for me.
I tried it and it didn't work. Did you use --data-table-library_grid-template-rows: 50px;
or just grid-template-rows: 50px
?
Btw i solved it by adding height: auto;
and max-height: 100%
in Table, don't know if there's a better way too.
thanks @andra961 - just what I needed for my issue in https://github.com/table-library/react-table-library/discussions/122