From bdc61b400211d9cb7f60625533d2599e70e6a8cf Mon Sep 17 00:00:00 2001 From: irma12 Date: Thu, 17 Mar 2022 22:17:11 +0100 Subject: [PATCH 1/2] Expose initialKind from CatalogPage Signed-off-by: irma12 --- .changeset/tasty-emus-hunt.md | 5 +++++ .../components/CatalogPage/DefaultCatalogPage.tsx | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .changeset/tasty-emus-hunt.md diff --git a/.changeset/tasty-emus-hunt.md b/.changeset/tasty-emus-hunt.md new file mode 100644 index 0000000000..d3b9430bf4 --- /dev/null +++ b/.changeset/tasty-emus-hunt.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': minor +--- + +Expose 'initalFilter' through initialKind prop on Catalog Page. diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index 2a2861ac29..8d65e54980 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -48,10 +48,16 @@ export interface DefaultCatalogPageProps { initiallySelectedFilter?: UserListFilterKind; columns?: TableColumn[]; actions?: TableProps['actions']; + initialKind?: string; } export function DefaultCatalogPage(props: DefaultCatalogPageProps) { - const { columns, actions, initiallySelectedFilter = 'owned' } = props; + const { + columns, + actions, + initiallySelectedFilter = 'owned', + initialKind = 'component', + } = props; const orgName = useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage'; const createComponentLink = useRouteRef(createComponentRouteRef); @@ -60,7 +66,9 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) { - }> + } + > Date: Fri, 18 Mar 2022 09:56:11 +0100 Subject: [PATCH 2/2] Add api report Signed-off-by: irma12 --- plugins/catalog/api-report.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/catalog/api-report.md b/plugins/catalog/api-report.md index eddbe913d7..a316ab0d03 100644 --- a/plugins/catalog/api-report.md +++ b/plugins/catalog/api-report.md @@ -161,6 +161,8 @@ export interface DefaultCatalogPageProps { // (undocumented) columns?: TableColumn[]; // (undocumented) + initialKind?: string; + // (undocumented) initiallySelectedFilter?: UserListFilterKind; }