Dragon14
Dragon14

Reputation: 317

How to set responsive height to react-table

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 enter image description here enter image description here

Upvotes: 0

Views: 3888

Answers (1)

Praveen kumar
Praveen kumar

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

Related Questions