소스 검색

Add frontend filtering of users in user picker #13425

Johannes Schill 7 년 전
부모
커밋
5c842f3ed3
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  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}