diff --git a/client/src/components/UserMultiSelect/UserMultiSelect.tsx b/client/src/components/UserMultiSelect/UserMultiSelect.tsx index a9f8a8c1..d88d5d38 100644 --- a/client/src/components/UserMultiSelect/UserMultiSelect.tsx +++ b/client/src/components/UserMultiSelect/UserMultiSelect.tsx @@ -96,6 +96,12 @@ const UserMultiSelect = (props: IUserMultiSelectProps) => { (a, b) => a.value === b.value, ) + useEffect(() => { + if (selected.some((a) => !mergedData.some((b) => a === b.value))) { + setFocused(true) + } + }, [mergedData.map((row) => row.value).join(','), selected.join(',')]) + return ( { required groups={['supervisor']} initialUsers={topic?.supervisors} + maxValues={1} {...form.getInputProps('supervisorIds')} />