Skip to content

Commit

Permalink
Force MultiSelect rerender to show updated values by updating the com…
Browse files Browse the repository at this point in the history
…ponent key
  • Loading branch information
adamodd committed Sep 19, 2024
1 parent a17475d commit 3396598
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ const TeamMemberForm = ({
{t('singleSystem.editTeam.form.rolesError')}
</FieldErrorMsg>
)}
<div>{field.value}</div>
<MultiSelect
{...{ ...field, ref: null }}
key={field.value.join()} // Doing this to rerender on value change
name={field.name}
options={rolesOrdered.map(role => ({
value: role.id,
Expand Down

0 comments on commit 3396598

Please sign in to comment.