+ {filteredOptions.map((option: SelectOption) => {
+ const isSelected = (value || []).includes(option.id)
+ return (
+
toggleOption(option.id)}
+ className={`px-2.5 py-1.5 hover:bg-accent rounded cursor-pointer flex items-center justify-between text-xs ${
+ isSelected ? 'bg-accent/30 font-medium' : ''
+ }`}
>
- {option.displayName}
-
- ))}
- >
- ) : (
- <>
-
e.stopPropagation()}
- >
-
- setSearchQuery(e.target.value)}
- autoFocus
- />
-
-
-
- {filteredOptions.map((option: SelectOption) => {
- const isSelected = (value || []).includes(option.id)
- return (
-
toggleOption(option.id)}
- className={`px-2.5 py-1.5 hover:bg-accent rounded cursor-pointer flex items-center justify-between text-xs ${
- isSelected ? 'bg-accent/30 font-medium' : ''
- }`}
- >
-
- {option.displayName}
-
- {isSelected && }
-
- )
- })}
-
- {filteredOptions.length === 0 && !trimmedSearch && (
-
- {m.no_options_found()}
-
- )}
-
- {trimmedSearch !== '' && !hasExactMatch && (
-
-
-
- {m.add_option_with_name({ name: trimmedSearch })}
-
-
- )}
+ {option.displayName}
+
+ {isSelected &&
}
+
+ )
+ })}
+
+ {filteredOptions.length === 0 && !trimmedSearch && (
+
+ {m.no_options_found()}
- >
- )}
+ )}
+
+ {trimmedSearch !== '' && !hasExactMatch && (
+
+
+
{m.add_option_with_name({ name: trimmedSearch })}
+
+ )}
+