Enable loading state for paginated catalog tables by passing isLoading prop
Signed-off-by: SzymonGr <szymong@onet.pl>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Enable loading state for paginated catalog tables by passing isLoading prop
|
||||
@@ -62,6 +62,7 @@ export function CursorPaginatedCatalogTable(props: PaginatedCatalogTableProps) {
|
||||
/* this will enable the next button accordingly */
|
||||
totalCount={next ? Number.MAX_VALUE : Number.MAX_SAFE_INTEGER}
|
||||
localization={{ pagination: { labelDisplayedRows: '' } }}
|
||||
isLoading={isLoading}
|
||||
{...restProps}
|
||||
/>
|
||||
);
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
export function OffsetPaginatedCatalogTable(
|
||||
props: TableProps<CatalogTableRow>,
|
||||
) {
|
||||
const { columns, data } = props;
|
||||
const { columns, data, isLoading } = props;
|
||||
const { updateFilters, setLimit, setOffset, limit, totalItems, offset } =
|
||||
useEntityList();
|
||||
const [page, setPage] = React.useState(
|
||||
@@ -68,6 +68,7 @@ export function OffsetPaginatedCatalogTable(
|
||||
}}
|
||||
totalCount={totalItems}
|
||||
localization={{ pagination: { labelDisplayedRows: '' } }}
|
||||
isLoading={isLoading}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user