Hi,
I am trying to figure out how I can apply a data filter in code by default.
Right now I have a button that does the behavior I want.
I thought maybe there is someway to access these events through gridOptions: onGridReady, onFirstDataRendered, such as below:
However I don’t know how to make this work with dash.
All the grid options are set in the python code and I don’t see any way to access these events.
The code would just need to call this javascript function automatically once the data is loaded:
function restoreFromHardCoded(gridApi) {
var hardcodedFilter = {
AmountType: {
type: 'set',
values: ['Expense'],
},
};
gridApi.setFilterModel(hardcodedFilter);
}
Thank you