summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-04-17 15:44:57 +0300
committereug-vs <eug-vs@keemail.me>2021-04-17 15:44:57 +0300
commit929cf0fa6cbbdb9983e09599a4ad303ba613771e (patch)
treee2d8710b9e8603729fd6c6d6aac2cbf95c9b8031 /src/lib
parentcfdce1fb1179cfe4f15fc26676f064ca10fb9ce4 (diff)
downloadcommercel-ui-929cf0fa6cbbdb9983e09599a4ad303ba613771e.tar.gz
feat: add reset filters button
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ServiceList.tsx10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/ServiceList.tsx b/src/lib/ServiceList.tsx
index 6316ea1..9f6835a 100644
--- a/src/lib/ServiceList.tsx
+++ b/src/lib/ServiceList.tsx
@@ -60,8 +60,16 @@ const ServiceList: React.FC = () => {
history.push(`${service.route}?${queryString}`);
};
+ const resetFilters = () => history.push(service.route);
+
return (
- <Page title={service.name} actions={actions} filters={filters} applyFilter={applyFilter}>
+ <Page
+ title={service.name}
+ actions={actions}
+ filters={filters}
+ applyFilter={applyFilter}
+ resetFilters={resetFilters}
+ >
<ListTable items={data} fields={service.tableFields} handleRowClick={handleRowClick} />
</Page>
);