fixed username display in the users dropdown on create/edit user policy (#30701)
Signed-off-by: Agnieszka Gancarczyk <agancarc@redhat.com> Co-authored-by: Agnieszka Gancarczyk <agancarc@redhat.com>
This commit is contained in:
parent
40b9af4b96
commit
91efe37ec2
2 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,7 @@ export const User = () => {
|
|||
label="users"
|
||||
helpText={t("policyUsers")}
|
||||
defaultValue={[]}
|
||||
variant="typeaheadMulti"
|
||||
isRequired
|
||||
/>
|
||||
);
|
||||
|
|
|
@ -62,6 +62,7 @@ export const UserSelect = ({
|
|||
const params: UserQuery = {
|
||||
max: 20,
|
||||
};
|
||||
|
||||
if (search) {
|
||||
params.username = search;
|
||||
}
|
||||
|
@ -154,7 +155,10 @@ export const UserSelect = ({
|
|||
);
|
||||
}}
|
||||
>
|
||||
{selection}
|
||||
{
|
||||
users.find((u) => u?.id === selection)
|
||||
?.username
|
||||
}
|
||||
</Chip>
|
||||
),
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue