react-data-grid icon indicating copy to clipboard operation
react-data-grid copied to clipboard

V7 Container height

Open igoriok1994 opened this issue 6 years ago • 5 comments

Hi,

Why in V7 is still no availability to use height='100%'?

It would be very convenient, if react-data-grid container height could be dynamic.

igoriok1994 avatar May 07 '20 11:05 igoriok1994

You can achieve this with an AutoSizer from the "react-virtualized" module. See the example below:

https://github.com/adazzle/react-data-grid/blob/canary/stories/demos/CommonFeatures.tsx#L275

I do find it odd that this is not built-in though.

Cin316 avatar May 07 '20 16:05 Cin316

You can achieve this with an AutoSizer from the "react-virtualized" module. See the example below:

Thanks for advice. I thought about Measure from 'react-measure', but react-virtualized will be a better decision. I'll try this.

igoriok1994 avatar May 07 '20 17:05 igoriok1994

https://github.com/bvaughn/react-window#related-libraries

It's better to use react-virtualized-auto-sizer if you only need this 1 component rather than the bloated package.

qili26 avatar May 07 '20 18:05 qili26

In v6 i did it with css only, so maybe in v7 it is also possible?

emsi-iggy avatar May 08 '20 12:05 emsi-iggy

In v6 i did it with css only, so maybe in v7 it is also possible?

Me too, but in V7 you cant.

igoriok1994 avatar May 08 '20 13:05 igoriok1994