Skip to content

Commit

Permalink
🐛 only render archetypes with associated apps in filter
Browse files Browse the repository at this point in the history
Signed-off-by: ibolton336 <[email protected]>
  • Loading branch information
ibolton336 committed Dec 11, 2023
1 parent e99029b commit bb74976
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion client/src/app/pages/issues/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ export const useSharedAffectedApplicationFilterCategories = <
t("actions.filterBy", {
what: t("terms.archetype").toLowerCase(),
}) + "...",
selectOptions: archetypes.map(({ name }) => ({ key: name, value: name })),
selectOptions: archetypes
.filter(({ applications }) => applications && applications.length > 0)
.map(({ name }) => ({ key: name, value: name })),
getServerFilterValue: (selectedOptions) =>
selectedOptions
?.map((option) => archetypes.find((item) => item.name === option))
Expand Down

0 comments on commit bb74976

Please sign in to comment.