diff --git a/plugins/catalog/src/components/CatalogTable/columns.tsx b/plugins/catalog/src/components/CatalogTable/columns.tsx index d88cc9a77d..87de8bfc91 100644 --- a/plugins/catalog/src/components/CatalogTable/columns.tsx +++ b/plugins/catalog/src/components/CatalogTable/columns.tsx @@ -63,19 +63,16 @@ export const columnFactories = Object.freeze({ title: 'System', field: 'resolved.partOfSystemRelationTitle', customFilterAndSearch: (query, row) => { - let systems: JsonArray = []; - if ( - row.entity?.spec?.system && - Array.isArray(row.entity?.spec?.system) - ) { - systems = row.entity?.spec?.system; - } else if (row.entity?.spec?.system) { - systems = [row.entity?.spec?.system]; + if (!row.resolved.partOfSystemRelations) { + return false; } - return systems - .join(', ') - .toLocaleUpperCase('en-US') - .includes(query.toLocaleUpperCase('en-US')); + + const systemNames = row.resolved.partOfSystemRelations.map( + ref => ref.name, + ); // Extract system names from entityRefs + + const searchText = systemNames.join(', ').toLocaleUpperCase('en-US'); + return searchText.includes(query.toLocaleUpperCase('en-US')); }, render: ({ resolved }) => (