Merge pull request #28953 from Ericsson/add_filteringsupport_systemcolumn

Added support for filtering based on system column in catalog table
This commit is contained in:
Fredrik Adelöw
2025-03-25 11:07:01 +01:00
committed by GitHub
2 changed files with 17 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog': minor
---
Added support of filtering based on system columns in catalog table
@@ -62,6 +62,18 @@ export const columnFactories = Object.freeze({
return {
title: 'System',
field: 'resolved.partOfSystemRelationTitle',
customFilterAndSearch: (query, row) => {
if (!row.resolved.partOfSystemRelations) {
return false;
}
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 }) => (
<EntityRefLinks
entityRefs={resolved.partOfSystemRelations}