Users: Resurrect org picker's search functionality (#78886)

[up] return search for org picker
This commit is contained in:
Victor Gorchilov 2024-03-12 13:29:02 +02:00 committed by GitHub
parent fbfaf8e003
commit fa6e4bbcd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,8 +45,11 @@ export function OrgPicker({ onSelected, className, inputId, autoFocus, excludeOr
className={className}
isLoading={orgOptionsState.loading}
defaultOptions={true}
isSearchable={false}
loadOptions={getOrgOptions}
filterOption={(option, rawInput) => {
const input = rawInput.toLowerCase();
return !!option.value?.name.toLowerCase().includes(input);
}}
onChange={onSelected}
placeholder="Select organization"
noOptionsMessage="No organizations found"