How To Fit Grid Vertically to Container? #3383
-
Hi, I just started to use this grid and it's easy to set up. I have it in a div container but it's not automatically fitting vertically. I've searched the docs but can't find how to configure it so it fits/sizes vertically to the div container. Essentially, I have it set up like this:
I don't have the grid-container class doing anything right now. The demo site has the grid nicely done and I'm trying to achieve the same within my div. Thanks for any help on this issue. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I wanted to post my solution as I finally found how to accomplish what I needed. I finally found the demo code which led to the solution since the demo site was doing what I wanted. I updated my grid container class as below. The min-height I used because if there's no data, the grid does not size so there has to be at least one row. Then I use the fit-grid class directly on data grid, i.e., CSS classes:
|
Beta Was this translation helpful? Give feedback.
I wanted to post my solution as I finally found how to accomplish what I needed. I finally found the demo code which led to the solution since the demo site was doing what I wanted.
I updated my grid container class as below. The min-height I used because if there's no data, the grid does not size so there has to be at least one row. Then I use the fit-grid class directly on data grid, i.e.,
<DataGrid className="fit-grid".../>
.CSS classes: