mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix: Show organization popup in alphabetical order (#22259)
* Show organization popup in alphabetical order * GetUserOrgList: Sort organizations by name in API Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
This commit is contained in:
@@ -26,9 +26,7 @@ export class OrgSwitcher extends React.PureComponent<Props, State> {
|
||||
|
||||
getUserOrgs = async () => {
|
||||
const orgs: UserOrgDTO[] = await getBackendSrv().get('/api/user/orgs');
|
||||
this.setState({
|
||||
orgs: orgs.sort((a, b) => a.orgId - b.orgId),
|
||||
});
|
||||
this.setState({ orgs });
|
||||
};
|
||||
|
||||
setCurrentOrg = async (org: UserOrgDTO) => {
|
||||
|
Reference in New Issue
Block a user