feat(TechDocs): allow passing in pagination from <TechDocsIndexPage /> down to the <EntityListProvider />
Signed-off-by: Yingbai He <yingbai.he@mycase.com>
This commit is contained in:
@@ -46,7 +46,13 @@ export type DefaultTechDocsHomeProps = TechDocsIndexPageProps;
|
||||
* @public
|
||||
*/
|
||||
export const DefaultTechDocsHome = (props: TechDocsIndexPageProps) => {
|
||||
const { initialFilter = 'owned', columns, actions, ownerPickerMode } = props;
|
||||
const {
|
||||
initialFilter = 'owned',
|
||||
columns,
|
||||
actions,
|
||||
ownerPickerMode,
|
||||
pagination,
|
||||
} = props;
|
||||
return (
|
||||
<TechDocsPageWrapper>
|
||||
<Content>
|
||||
@@ -55,7 +61,7 @@ export const DefaultTechDocsHome = (props: TechDocsIndexPageProps) => {
|
||||
Discover documentation in your ecosystem.
|
||||
</SupportButton>
|
||||
</ContentHeader>
|
||||
<EntityListProvider>
|
||||
<EntityListProvider pagination={pagination}>
|
||||
<CatalogFilterLayout>
|
||||
<CatalogFilterLayout.Filters>
|
||||
<TechDocsPicker />
|
||||
|
||||
@@ -18,6 +18,7 @@ import React from 'react';
|
||||
import { useOutlet } from 'react-router-dom';
|
||||
import { TableColumn, TableProps } from '@backstage/core-components';
|
||||
import {
|
||||
EntityListPagination,
|
||||
EntityOwnerPickerProps,
|
||||
UserListFilterKind,
|
||||
} from '@backstage/plugin-catalog-react';
|
||||
@@ -34,6 +35,7 @@ export type TechDocsIndexPageProps = {
|
||||
columns?: TableColumn<DocsTableRow>[];
|
||||
actions?: TableProps<DocsTableRow>['actions'];
|
||||
ownerPickerMode?: EntityOwnerPickerProps['mode'];
|
||||
pagination?: EntityListPagination;
|
||||
};
|
||||
|
||||
export const TechDocsIndexPage = (props: TechDocsIndexPageProps) => {
|
||||
|
||||
Reference in New Issue
Block a user