Skip to content

Commit

Permalink
Merge branch 'main' into remove-dupe-targets
Browse files Browse the repository at this point in the history
  • Loading branch information
ibolton336 committed Jun 10, 2024
2 parents 1db9932 + 799ee18 commit 48bc75b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ export const MultiselectFilterControl = <TItem,>({
</MenuToggle>
);

const withGroupPrefix = (group: string) =>
group === category.title ? group : `${category.title}/${group}`;

return (
<>
{
Expand All @@ -234,8 +237,8 @@ export const MultiselectFilterControl = <TItem,>({
chips={chipsFor(firstGroup)}
deleteChip={(_, chip) => onFilterClear(chip)}
deleteChipGroup={() => onFilterClearGroup(firstGroup)}
categoryName={firstGroup}
key={firstGroup}
categoryName={{ name: firstGroup, key: withGroupPrefix(firstGroup) }}
key={withGroupPrefix(firstGroup)}
showToolbarItem={showToolbarItem}
>
<Select
Expand Down Expand Up @@ -285,8 +288,8 @@ export const MultiselectFilterControl = <TItem,>({
chips={chipsFor(groupName)}
deleteChip={(_, chip) => onFilterClear(chip)}
deleteChipGroup={() => onFilterClearGroup(groupName)}
categoryName={groupName}
key={groupName}
categoryName={{ name: groupName, key: withGroupPrefix(groupName) }}
key={withGroupPrefix(groupName)}
showToolbarItem={false}
>
{" "}
Expand Down

0 comments on commit 48bc75b

Please sign in to comment.