SHUBHAM DEKATE
SHUBHAM DEKATE

Reputation: 135

How to Create a grid of desired Size by using react-data-grid in reactjs?

How to set the size of the final table created using react-data-grid.

For example if I want a 250*250 px size table, how to do that.

Is there any props already available for that? or it needs to be done using the pure CSS.


After solution provided by Saurav

enter image description here

Upvotes: 0

Views: 297

Answers (1)

saurav Sinha
saurav Sinha

Reputation: 448

You can use something like this

this.dynamicHeight = 250px;
this.dyanmicWidth = 250px
<ReactDataGrid
minHeight={dynamicHeight}
minWidth={dynamicWidth}
...
/>

I hope this helps.

Upvotes: 1

Related Questions