Ver Fonte

Add frontend filtering of users in user picker #13425

Johannes Schill há 7 anos atrás
pai
commit
5c842f3ed3
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      public/app/core/components/Picker/UserPicker.tsx

+ 3 - 0
public/app/core/components/Picker/UserPicker.tsx

@@ -71,6 +71,9 @@ export class UserPicker extends Component<Props, State> {
             NoOptionsMessage,
           }}
           placeholder="Select user"
+          filterOption={(option: { label: string }, searchText?: string) => {
+            return option.label.includes(searchText);
+          }}
           loadingMessage={() => 'Loading...'}
           noOptionsMessage={() => 'No users found'}
           getOptionValue={i => i.id}