backport to fix username display in the users dropdown on create/edit user policy (#30737)

Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com>
Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
agagancarczyk
2024-06-25 12:31:10 +01:00
committed by GitHub
parent 4a6e14705c
commit 394ea13f53
2 changed files with 5 additions and 1 deletions
@@ -9,6 +9,7 @@ export const User = () => {
label="users"
helpText={t("policyUsers")}
defaultValue={[]}
variant="typeaheadMulti"
isRequired
/>
);
@@ -154,7 +154,10 @@ export const UserSelect = ({
);
}}
>
{selection}
{
users.find((u) => u?.id === selection)
?.username
}
</Chip>
),
)}