#10453 Updated variable names after feedback
Signed-off-by: Shailendra Ahir <shailendraahir@hotmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ export interface DefaultCatalogPageProps {
|
||||
columns?: TableColumn<CatalogTableRow>[];
|
||||
actions?: TableProps<CatalogTableRow>['actions'];
|
||||
initialKind?: string;
|
||||
options?: TableProps<CatalogTableRow>['options'];
|
||||
tableOptions?: TableProps<CatalogTableRow>['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) {
|
||||
<CatalogTable
|
||||
columns={columns}
|
||||
actions={actions}
|
||||
options={options}
|
||||
tableOptions={tableOptions}
|
||||
/>
|
||||
</CatalogFilterLayout.Content>
|
||||
</CatalogFilterLayout>
|
||||
|
||||
@@ -50,7 +50,7 @@ import Star from '@material-ui/icons/Star';
|
||||
export interface CatalogTableProps {
|
||||
columns?: TableColumn<CatalogTableRow>[];
|
||||
actions?: TableProps<CatalogTableRow>['actions'];
|
||||
options?: TableProps<CatalogTableRow>['options'];
|
||||
tableOptions?: TableProps<CatalogTableRow>['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 (
|
||||
<Table<CatalogTableRow>
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user