#10453 Added props to DefaultCatalogPage.tsx and updated changeset
Signed-off-by: Shailendra Ahir <shailendraahir@hotmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-catalog': patch
|
||||
---
|
||||
|
||||
Added options property to CatalogTable and DefaultCatalogPage to support customization of the Catalog Table. Related issue #10453
|
||||
@@ -164,6 +164,8 @@ export interface DefaultCatalogPageProps {
|
||||
columns?: TableColumn<CatalogTableRow>[];
|
||||
// (undocumented)
|
||||
initiallySelectedFilter?: UserListFilterKind;
|
||||
// (undocumented)
|
||||
options?: TableProps<CatalogTableRow>['options'];
|
||||
}
|
||||
|
||||
// @public
|
||||
|
||||
@@ -48,10 +48,16 @@ export interface DefaultCatalogPageProps {
|
||||
initiallySelectedFilter?: UserListFilterKind;
|
||||
columns?: TableColumn<CatalogTableRow>[];
|
||||
actions?: TableProps<CatalogTableRow>['actions'];
|
||||
options?: TableProps<CatalogTableRow>['options'];
|
||||
}
|
||||
|
||||
export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
|
||||
const { columns, actions, initiallySelectedFilter = 'owned' } = props;
|
||||
const {
|
||||
columns,
|
||||
actions,
|
||||
initiallySelectedFilter = 'owned',
|
||||
options = {},
|
||||
} = props;
|
||||
const orgName =
|
||||
useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage';
|
||||
const createComponentLink = useRouteRef(createComponentRouteRef);
|
||||
@@ -76,7 +82,11 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) {
|
||||
<EntityTagPicker />
|
||||
</CatalogFilterLayout.Filters>
|
||||
<CatalogFilterLayout.Content>
|
||||
<CatalogTable columns={columns} actions={actions} />
|
||||
<CatalogTable
|
||||
columns={columns}
|
||||
actions={actions}
|
||||
options={options}
|
||||
/>
|
||||
</CatalogFilterLayout.Content>
|
||||
</CatalogFilterLayout>
|
||||
</Content>
|
||||
|
||||
Reference in New Issue
Block a user