diff --git a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx index b92d993203..5250dcec0d 100644 --- a/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/DefaultCatalogPage.tsx @@ -49,7 +49,7 @@ export interface DefaultCatalogPageProps { columns?: TableColumn[]; actions?: TableProps['actions']; initialKind?: string; - options?: TableProps['options']; + tableOptions?: TableProps['options']; } export function DefaultCatalogPage(props: DefaultCatalogPageProps) { @@ -58,7 +58,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) { actions, initiallySelectedFilter = 'owned', initialKind = 'component', - options = {}, + tableOptions = {}, } = props; const orgName = useApi(configApiRef).getOptionalString('organization.name') ?? 'Backstage'; @@ -89,7 +89,7 @@ export function DefaultCatalogPage(props: DefaultCatalogPageProps) { diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index 98283793e2..433032a69e 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -50,7 +50,7 @@ import Star from '@material-ui/icons/Star'; export interface CatalogTableProps { columns?: TableColumn[]; actions?: TableProps['actions']; - options?: TableProps['options']; + tableOptions?: TableProps['options']; } const YellowStar = withStyles({ @@ -61,7 +61,7 @@ const YellowStar = withStyles({ /** @public */ export const CatalogTable = (props: CatalogTableProps) => { - const { columns, actions, options } = props; + const { columns, actions, tableOptions } = props; const { isStarredEntity, toggleStarredEntity } = useStarredEntities(); const { loading, error, entities, filters } = useEntityList(); @@ -164,8 +164,6 @@ export const CatalogTable = (props: CatalogTableProps) => { typeColumn.hidden = !showTypeColumn; } const showPagination = rows.length > 20; - const optionsOverride = - options && Object.keys(options).length > 0 ? options : {}; return ( @@ -179,7 +177,7 @@ export const CatalogTable = (props: CatalogTableProps) => { showEmptyDataSourceMessage: !loading, padding: 'dense', pageSizeOptions: [20, 50, 100], - ...optionsOverride, + ...tableOptions, }} title={`${titlePreamble} (${entities.length})`} data={rows}