Skip to content

Commit ffd2889

Browse files
committed
Does not show Pagination when No data in Data Source.
1 parent 3d75c3a commit ffd2889

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

client/packages/lowcoder/src/pages/datasource/datasourceList.tsx

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export const DatasourceList = () => {
111111
const [isCreateFormShow, showCreateForm] = useState(false);
112112
const [shareDatasourceId, setShareDatasourceId] = useState<string | undefined>(undefined);
113113
const [modify, setModify] = useState(false);
114-
const datasource = useSelector(getDataSource);
115114
const currentUser = useSelector(getUser);
116115
const orgId = currentUser.currentOrgId;
117116
const datasourceLoading = useSelector(getDataSourceLoading);
@@ -336,13 +335,13 @@ export const DatasourceList = () => {
336335
creator: info.creatorName,
337336
edit: info.edit,
338337
}))} />
339-
<PaginationComp
340-
currentPage={currentPage}
341-
pageSize={pageSize}
342-
setPageSize={setPageSize}
343-
setCurrentPage={setCurrentPage}
344-
total={elements.total}
345-
/>
338+
{ !!elements.elements.length ? <PaginationComp
339+
currentPage={currentPage}
340+
pageSize={pageSize}
341+
setPageSize={setPageSize}
342+
setCurrentPage={setCurrentPage}
343+
total={elements.total}
344+
/> : <></>}
346345
</BodyWrapper>
347346
{shareDatasourceId && (
348347
<DatasourcePermissionDialog

0 commit comments

Comments
 (0)