fix(ui): filter UserAutocomplete by username or email

This commit is contained in:
Claude
2025-10-02 13:21:48 +00:00
committed by Cian Johnston
parent d93629bcde
commit 43587d1b56
@@ -132,6 +132,14 @@ const InnerAutocomplete = <T extends SelectedUser>({
open={open}
isOptionEqualToValue={(a, b) => a.username === b.username}
getOptionLabel={(option) => option.email}
filterOptions={(options, state) => {
const inputValue = state.inputValue.toLowerCase();
return options.filter(
(option) =>
option.username.toLowerCase().includes(inputValue) ||
option.email.toLowerCase().includes(inputValue),
);
}}
onOpen={() => {
setOpen(true);
setFilter(value?.email ?? "");