aboutsummaryrefslogtreecommitdiffstats
path: root/sdnr/wt/odlux/framework/src/components/material-table/utilities.ts
diff options
context:
space:
mode:
Diffstat (limited to 'sdnr/wt/odlux/framework/src/components/material-table/utilities.ts')
-rw-r--r--sdnr/wt/odlux/framework/src/components/material-table/utilities.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/sdnr/wt/odlux/framework/src/components/material-table/utilities.ts b/sdnr/wt/odlux/framework/src/components/material-table/utilities.ts
index f9015493f..e2fda7647 100644
--- a/sdnr/wt/odlux/framework/src/components/material-table/utilities.ts
+++ b/sdnr/wt/odlux/framework/src/components/material-table/utilities.ts
@@ -51,6 +51,7 @@ export type ExternalMethodes<TData> = {
onHandleChangeRowsPerPage: (rowsPerPage: number | null) => void;
onHideColumns: (columnName: string[]) => void;
onShowColumns: (columnName: string[]) => void;
+ onClearFilters: () => void;
},
createPreActions: (dispatch: Dispatch, skipRefresh?: boolean) => {
onPreFilterChanged: (preFilter: {
@@ -328,7 +329,13 @@ export function createExternal<TData>(callback: DataCallback<TData>, selectState
dispatch((dispatch: Dispatch) => {
dispatch(new ShowColumnsAction(columnName));
})
- }
+ },
+ onClearFilters: () => {
+ dispatch((dispatch: Dispatch) => {
+ let filter = { };
+ dispatch(new SetFilterChangedAction(filter));
+ });
+ },
// selected:
};
};