Forms migration: User edit (#23110)

* Forms for UserProfile

* Migrate to new Form styles

* Add remove icon

* Remove unused import

* Update public/app/features/admin/UserOrgs.tsx

* Remove comment

* Remove icon and add text

* Make every ButtonGroup unique - regardless of values

* Remove visual glitch etc.

* Fic failing typecheck
This commit is contained in:
Tobias Skarhed
2020-04-01 17:36:08 +02:00
committed by GitHub
parent 6803db87de
commit 69259d62a0
10 changed files with 114 additions and 124 deletions

View File

@@ -1,5 +1,5 @@
import React, { PureComponent } from 'react';
import { AsyncSelect } from '@grafana/ui';
import { Forms } from '@grafana/ui';
import { getBackendSrv } from 'app/core/services/backend_srv';
import { Organization } from 'app/types';
import { SelectableValue } from '@grafana/data';
@@ -54,18 +54,16 @@ export class OrgPicker extends PureComponent<Props, State> {
const { isLoading } = this.state;
return (
<div className="org-picker">
<AsyncSelect
className={className}
isLoading={isLoading}
defaultOptions={true}
isSearchable={false}
loadOptions={this.getOrgOptions}
onChange={onSelected}
placeholder="Select organization"
noOptionsMessage={() => 'No organizations found'}
/>
</div>
<Forms.AsyncSelect
className={className}
isLoading={isLoading}
defaultOptions={true}
isSearchable={false}
loadOptions={this.getOrgOptions}
onChange={onSelected}
placeholder="Select organization"
noOptionsMessage="No organizations found"
/>
);
}
}