From fa6e4bbcd060d619bd885a5fab610ab562da2281 Mon Sep 17 00:00:00 2001 From: Victor Gorchilov Date: Tue, 12 Mar 2024 13:29:02 +0200 Subject: [PATCH] Users: Resurrect org picker's search functionality (#78886) [up] return search for org picker --- public/app/core/components/Select/OrgPicker.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/app/core/components/Select/OrgPicker.tsx b/public/app/core/components/Select/OrgPicker.tsx index e465decd529..27214d9f18e 100644 --- a/public/app/core/components/Select/OrgPicker.tsx +++ b/public/app/core/components/Select/OrgPicker.tsx @@ -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"