diff options
author | eug-vs <eug-vs@keemail.me> | 2021-04-24 18:43:52 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-04-24 18:46:36 +0300 |
commit | aa04c35e73ddd1f2d38de68e437c0c3d697d42e2 (patch) | |
tree | f08bdf09dc9671d0b9843cf8ceaee308fd5edd64 /src/lib | |
parent | 7db2d671b266d422606a845683a1c3a2ea75d68a (diff) | |
download | commercel-ui-aa04c35e73ddd1f2d38de68e437c0c3d697d42e2.tar.gz |
feat: add loading indicator stubs
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ServiceList.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/ServiceList.tsx b/src/lib/ServiceList.tsx index be9a311..21b6077 100644 --- a/src/lib/ServiceList.tsx +++ b/src/lib/ServiceList.tsx @@ -12,7 +12,7 @@ const ServiceList: React.FC = () => { const service = useContext(ServiceContext); const history = useHistory(); const location = useLocation(); - const { data } = hooks[service.route].useList(location.search); + const { data, isValidating } = hooks[service.route].useList(location.search); const actions = service.actions || [{ name: 'Добавить', @@ -37,10 +37,16 @@ const ServiceList: React.FC = () => { return ( <Page title={service.name} + isValidating={isValidating} actions={actions} filters={filters} > - <ListTable items={data} fields={service.tableFields} handleRowClick={handleRowClick} /> + <ListTable + items={data} + fields={service.tableFields} + isValidating={isValidating} + handleRowClick={handleRowClick} + /> </Page> ); }; |