I am trying to set the style of Aggrid heigth to 100% but the table does not show. I tried using viewport and pixel, they worked perfectly fine. Fow the width, percentage is also working fine.
What I want to do is to fit the Aggrid table height to the parent Div. I am still learning JustPy and python in general so this question might be about fundamentals of styling.
import justpy as jp
grid_options = """
{
defaultColDef: {
filter: true,
sortable: true,
resizable: true,
cellStyle: {textAlign: 'center'},
headerClass: 'font-bold'
},
columnDefs: [
{headerName: "Make", field: "make"},
{headerName: "Model", field: "model"},
{headerName: "Price", field: "price"}
],
rowData: [
{make: "Toyota", model: "Celica", price: 35000},
{make: "Ford", model: "Mondeo", price: 32000},
{make: "Porsche", model: "Boxter", price: 72000}
]
}
"""
def grid_test5():
wp = jp.QuasarPage()
c1 = jp.Div(a=wp, classes='q-pa-sm')
grid = jp.AgGrid(a=c1, options=grid_options, style='height: 100%; width: 100%; margin: 0.25em')
return wp
jp.justpy(grid_test5)