Reputation: 317
I use react-table: https://github.com/tannerlinsley/react-table/tree/v6 and also use bootstrap. My table is adaptive to mobile devices in width but not in height. How to make it responsive in height?
That is the quantity of shown rows must be the same in initial screen and screen with changed height
Upvotes: 0
Views: 3888
Reputation: 1
Use window.innerHeight
to get the window screen
size and store it in a state
variable and pass the height
value stored in the state
to table
.Add event listeners window.addEventListener
for responsive height changes in table
Upvotes: 1