diff options
author | eug-vs <eug-vs@keemail.me> | 2021-04-17 19:56:30 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-04-17 19:56:30 +0300 |
commit | c222bc06f9c123d3e2fa4a428d74032f54887485 (patch) | |
tree | e7c809251516442a773b7886020bec9914437662 /src/lib/ServiceList.tsx | |
parent | f3d3471e697d6ebede4fa584c8671fb686028381 (diff) | |
download | commercel-ui-c222bc06f9c123d3e2fa4a428d74032f54887485.tar.gz |
feat: add ServiceSearch
Diffstat (limited to 'src/lib/ServiceList.tsx')
-rw-r--r-- | src/lib/ServiceList.tsx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/ServiceList.tsx b/src/lib/ServiceList.tsx index ae17a9c..8983bfa 100644 --- a/src/lib/ServiceList.tsx +++ b/src/lib/ServiceList.tsx @@ -6,6 +6,7 @@ import ListTable from '../components/ListTable'; import hooks from '../hooks/useAPIClient'; import ServiceContext from './ServiceContext'; import ServiceFilters from './ServiceFilters'; +import ServiceSearch from './ServiceSearch'; const ServiceList: React.FC = () => { const service = useContext(ServiceContext); @@ -26,11 +27,18 @@ const ServiceList: React.FC = () => { history.push(route); }; + const filters = ( + <> + {service.searchBy && <ServiceSearch />} + {service.filters && <ServiceFilters />} + </> + ); + return ( <Page title={service.name} actions={actions} - filters={<ServiceFilters />} + filters={filters} > <ListTable items={data} fields={service.tableFields} handleRowClick={handleRowClick} /> </Page> |