I have a few css entries in assets/stylesheets.css
that customize my AG Grid component. For example,
.ag-theme-alpine {
--ag-font-size: "1rem";
--ag-font-family: Roboto;
}
However, the component does not respect them. When I run the app locally in debug mode, what I notice is that if I change something in the .css while the app runs and save the file (e.g. just add an empty line), then the css is picked up when the app refreshes. But never picked up on the initial load.
My component is defined as follows:
default_col_def = {
"resizable": False,
"sortable": True,
"editable": False,
"wrapText": True,
"suppressMenu": True, # kills the fitler appearing on hover near the header
"filter": True,
"floatingFilter": True,
"floatingFilterComponentParams": {"suppressFilterButton": True},
"filterParams": {"caseSensitive": True,
"filterPlaceholder": "Filtrera...",
"suppressAndOrCondition": True,
},
}
table = dag.AgGrid(
id="main_table",
className="ag-theme-alpine",
defaultColDef=default_col_def,
dangerously_allow_code=False
)
Maybe someone has an idea of what the issue might be?