diff --git a/packages/app/src/App.tsx b/packages/app/src/App.tsx
index 6e653802ef..c2296d01e7 100644
--- a/packages/app/src/App.tsx
+++ b/packages/app/src/App.tsx
@@ -182,7 +182,7 @@ const routes = (
}>
{homePage}
- } />
+ } />
}
diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx
index b1cc0d3913..4797871fbf 100644
--- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx
+++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx
@@ -50,21 +50,20 @@ import { CatalogTableColumnsFunc } from '../CatalogTable/types';
export interface BaseCatalogPageProps {
filters: ReactNode;
content?: ReactNode;
- enablePagination?: boolean;
}
/** @internal */
export function BaseCatalogPage(props: BaseCatalogPageProps) {
- const {
- filters,
- enablePagination,
- content = ,
- } = props;
+ const { filters, content = } = props;
const orgName =
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
const createComponentLink = useRouteRef(createComponentRouteRef);
const { t } = useTranslationRef(catalogTranslationRef);
+ const enablePagination = useApi(configApiRef).getOptionalBoolean(
+ 'catalog.experimental.paginatedEntities',
+ );
+
return (
@@ -99,7 +98,6 @@ export interface DefaultCatalogPageProps {
tableOptions?: TableProps['options'];
emptyContent?: ReactNode;
ownerPickerMode?: EntityOwnerPickerProps['mode'];
- enablePagination?: boolean;
}
export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
@@ -111,12 +109,10 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
tableOptions = {},
emptyContent,
ownerPickerMode,
- enablePagination,
} = props;
return (
@@ -135,7 +131,6 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
actions={actions}
tableOptions={tableOptions}
emptyContent={emptyContent}
- enablePagination={enablePagination}
/>
}
/>
diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx
index e495c993a9..c5eddce118 100644
--- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx
+++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx
@@ -59,7 +59,6 @@ export interface CatalogTableProps {
tableOptions?: TableProps['options'];
emptyContent?: ReactNode;
subtitle?: string;
- enablePagination?: boolean;
}
const YellowStar = withStyles({
@@ -131,7 +130,8 @@ export const CatalogTable = (props: CatalogTableProps) => {
} = props;
const { isStarredEntity, toggleStarredEntity } = useStarredEntities();
const entityListContext = useEntityList();
- const { loading, error, entities, filters } = entityListContext;
+ const { loading, error, entities, filters, pageInfo } = entityListContext;
+ const enablePagination = !!pageInfo;
const tableColumns = useMemo(
() =>
@@ -217,7 +217,7 @@ export const CatalogTable = (props: CatalogTableProps) => {
.filter(s => s)
.join(' ');
- if (props.enablePagination) {
+ if (enablePagination) {
return (