From 929cf0fa6cbbdb9983e09599a4ad303ba613771e Mon Sep 17 00:00:00 2001
From: eug-vs <eug-vs@keemail.me>
Date: Sat, 17 Apr 2021 15:44:57 +0300
Subject: feat: add reset filters button

---
 src/lib/ServiceList.tsx | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

(limited to 'src/lib/ServiceList.tsx')

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>
   );
-- 
cgit v1.2.3

