Skip to content

Commit 4e14f2f

Browse files
fix(adoption-insights): fix FilterDropdown to show translated 'All' option (#1835)
1 parent d13d824 commit 4e14f2f

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@red-hat-developer-hub/backstage-plugin-adoption-insights': patch
3+
---
4+
5+
Fix FilterDropdown to show translated "All" option. When "All" is selected in the catalog entities filter dropdown, it now displays the translated text (e.g., "Tous" in French) instead of always showing "All" in English.

workspaces/adoption-insights/plugins/adoption-insights/src/components/CatalogEntities/FilterDropdown.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,11 @@ const FilterDropdown = ({
3636
<InputLabel id="kind-select">{t('filter.selectKind')}</InputLabel>
3737
<Select
3838
labelId="kind-select"
39-
renderValue={(selected: string) =>
40-
selected.length === 0 ? t('filter.selectKind') : selected
41-
}
39+
renderValue={(selected: string) => {
40+
if (selected.length === 0) return t('filter.selectKind');
41+
if (selected === 'All') return t('filter.all');
42+
return selected;
43+
}}
4244
value={selectedOption}
4345
onChange={handleChange}
4446
label={t('filter.selectKind')}

0 commit comments

Comments
 (0)