However, it seems that dash-ag-grid does not recognise groupAggFiltering as a possible JS function and the JS function is not executed.
app = Dash()
df = pd.read_csv(
"https://raw.githubusercontent.com/plotly/datasets/master/ag-grid/olympic-winners.csv"
)
columnDefs = [
# Row group by country and by year is enabled.
{
"field": "country",
"rowGroup": True,
"hide": True,
"suppressColumnsToolPanel": True,
},
{
"field": "sport",
"rowGroup": True,
"hide": True,
"suppressColumnsToolPanel": True,
},
{
"field": "year",
"pivot": True,
"hide": True,
"suppressColumnsToolPanel": True,
},
{"field": "gold", "sortable": True, "filter": True, "aggFunc": "sum"},
{"field": "silver", "sortable": True, "filter": True, "aggFunc": "sum"},
{
"headerName": "ratio",
"colId": "goldSilverRatio",
"aggFunc": {"function": "ratioAggFunc(params)"},
"valueGetter": {"function": "ratioValueGetter(params)"},
"valueFormatter": {"function": "ratioFormatter(params)"},
},
]
app.layout = html.Div(
[
dag.AgGrid(
id="example",
enableEnterpriseModules=True,
columnDefs=columnDefs,
rowData=df.to_dict("records"),
dashGridOptions={groupAggFiltering":{"function":"!!params.node.group" }
),
]
)
I think this can be solved by adding groupAggFiltering to the list of GRID_MAYBE_FUNCTIONS in "propCategories.js".
Hello,
Following the documentation of ag grid regarding the filtering when using aggregation. I tried to use the "groupAggFiltering" in the grid options with a javascript function (see https://www.ag-grid.com/javascript-data-grid/aggregation-filtering/#configure-by-callback).
However, it seems that dash-ag-grid does not recognise groupAggFiltering as a possible JS function and the JS function is not executed.
Hence the provided example below does not execute the code in groupAggFiltering:
I think this can be solved by adding groupAggFiltering to the list of GRID_MAYBE_FUNCTIONS in "propCategories.js".