mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
UserPicker: Use clearable AsyncSelect for the UserPicker (#27994)
This commit is contained in:
parent
dfe04ea3e8
commit
6173aa70b7
@ -3,8 +3,7 @@ import React, { Component } from 'react';
|
||||
import _ from 'lodash';
|
||||
|
||||
// Components
|
||||
import { LegacyForms } from '@grafana/ui';
|
||||
const { AsyncSelect } = LegacyForms;
|
||||
import { AsyncSelect } from '@grafana/ui';
|
||||
|
||||
// Utils & Services
|
||||
import { debounce } from 'lodash';
|
||||
@ -66,13 +65,14 @@ export class UserPicker extends Component<Props, State> {
|
||||
return (
|
||||
<div className="user-picker" data-testid="userPicker">
|
||||
<AsyncSelect
|
||||
isClearable
|
||||
className={className}
|
||||
isLoading={isLoading}
|
||||
defaultOptions={true}
|
||||
loadOptions={this.debouncedSearch}
|
||||
onChange={onSelected}
|
||||
placeholder="Select user"
|
||||
noOptionsMessage={() => 'No users found'}
|
||||
noOptionsMessage="No users found"
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user