filter out parent group if it doesn't match (#28344)
fixes: #28079 Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
This commit is contained in:
parent
df55dafe8d
commit
952d484907
1 changed files with 14 additions and 12 deletions
|
@ -226,18 +226,20 @@ export const GroupPickerDialog = ({
|
|||
.slice(groupId ? first : 0, max + (groupId ? first : 0))
|
||||
.map((group: SelectableGroup) => (
|
||||
<Fragment key={group.id}>
|
||||
<GroupRow
|
||||
key={group.id}
|
||||
group={group}
|
||||
isRowDisabled={isRowDisabled}
|
||||
onSelect={setGroupId}
|
||||
type={type}
|
||||
isSearching={isSearching}
|
||||
setIsSearching={setIsSearching}
|
||||
selectedRows={selectedRows}
|
||||
setSelectedRows={setSelectedRows}
|
||||
canBrowse={canBrowse}
|
||||
/>
|
||||
{(!isSearching || group.name?.includes(filter)) && (
|
||||
<GroupRow
|
||||
key={group.id}
|
||||
group={group}
|
||||
isRowDisabled={isRowDisabled}
|
||||
onSelect={setGroupId}
|
||||
type={type}
|
||||
isSearching={isSearching}
|
||||
setIsSearching={setIsSearching}
|
||||
selectedRows={selectedRows}
|
||||
setSelectedRows={setSelectedRows}
|
||||
canBrowse={canBrowse}
|
||||
/>
|
||||
)}
|
||||
{isSearching &&
|
||||
group.subGroups?.map((g) => (
|
||||
<GroupRow
|
||||
|
|
Loading…
Reference in a new issue