diff --git a/.changeset/sweet-icons-sneeze.md b/.changeset/sweet-icons-sneeze.md new file mode 100644 index 0000000000..b12424c7a8 --- /dev/null +++ b/.changeset/sweet-icons-sneeze.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Fix `EntityTypeFilter` so generating available types is case insensitive diff --git a/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx b/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx index 8e8c1b24d7..464531a4d9 100644 --- a/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx +++ b/plugins/catalog-react/src/hooks/useEntityTypeFilter.tsx @@ -96,7 +96,13 @@ export function useEntityTypeFilter(): { } // Sort by facet count descending, so the most common types appear on top - const newTypes = sortBy(facets, f => -f.count).map(f => f.value); + const newTypes = [ + ...new Set( + sortBy(facets, f => -f.count).map(f => + f.value.toLocaleLowerCase('en-US'), + ), + ), + ]; setAvailableTypes(newTypes); // Update type filter to only valid values when the list of available types has changed