catalog: wire up enablePagination prop
Signed-off-by: Vincenzo Scamporlino <vincenzos@spotify.com>
This commit is contained in:
@@ -50,11 +50,16 @@ import { CatalogTableColumnsFunc } from '../CatalogTable/types';
|
||||
export interface BaseCatalogPageProps {
|
||||
filters: ReactNode;
|
||||
content?: ReactNode;
|
||||
enablePagination?: boolean;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export function BaseCatalogPage(props: BaseCatalogPageProps) {
|
||||
const { filters, content = <CatalogTable /> } = props;
|
||||
const {
|
||||
filters,
|
||||
enablePagination,
|
||||
content = <CatalogTable enablePagination={enablePagination} />,
|
||||
} = props;
|
||||
const orgName =
|
||||
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
|
||||
const createComponentLink = useRouteRef(createComponentRouteRef);
|
||||
@@ -70,7 +75,7 @@ export function BaseCatalogPage(props: BaseCatalogPageProps) {
|
||||
/>
|
||||
<SupportButton>All your software catalog entities</SupportButton>
|
||||
</ContentHeader>
|
||||
<EntityListProvider>
|
||||
<EntityListProvider enablePagination={enablePagination}>
|
||||
<CatalogFilterLayout>
|
||||
<CatalogFilterLayout.Filters>{filters}</CatalogFilterLayout.Filters>
|
||||
<CatalogFilterLayout.Content>{content}</CatalogFilterLayout.Content>
|
||||
@@ -94,6 +99,7 @@ export interface DefaultCatalogPageProps {
|
||||
tableOptions?: TableProps<CatalogTableRow>['options'];
|
||||
emptyContent?: ReactNode;
|
||||
ownerPickerMode?: EntityOwnerPickerProps['mode'];
|
||||
enablePagination?: boolean;
|
||||
}
|
||||
|
||||
export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
|
||||
@@ -105,10 +111,12 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
|
||||
tableOptions = {},
|
||||
emptyContent,
|
||||
ownerPickerMode,
|
||||
enablePagination,
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<BaseCatalogPage
|
||||
enablePagination={enablePagination}
|
||||
filters={
|
||||
<>
|
||||
<EntityKindPicker initialFilter={initialKind} />
|
||||
@@ -127,6 +135,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
|
||||
actions={actions}
|
||||
tableOptions={tableOptions}
|
||||
emptyContent={emptyContent}
|
||||
enablePagination={enablePagination}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@@ -58,6 +58,7 @@ export interface CatalogTableProps {
|
||||
tableOptions?: TableProps<CatalogTableRow>['options'];
|
||||
emptyContent?: ReactNode;
|
||||
subtitle?: string;
|
||||
enablePagination?: boolean;
|
||||
}
|
||||
|
||||
const YellowStar = withStyles({
|
||||
|
||||
Reference in New Issue
Block a user