mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(authentication): provider selection
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
*/
|
||||
|
||||
import { observer } from 'mobx-react';
|
||||
import { useEffect } from 'react';
|
||||
import { useTabState, Tab as BaseTab, TabList } from 'reakit/Tab';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
@@ -101,6 +102,7 @@ export const AuthDialog: DialogComponent<null, null> = observer(
|
||||
selectedId: controller.provider?.id,
|
||||
});
|
||||
tab.selectedId = controller.provider?.id || null;
|
||||
useEffect(() => controller.selectProvider(tab.selectedId!), [tab.selectedId]);
|
||||
|
||||
return styled(useStyles(styles))(
|
||||
<CommonDialogWrapper
|
||||
|
||||
@@ -102,9 +102,7 @@ export class AuthDialogController implements IInitializableController, IDestruct
|
||||
return providerA.label.localeCompare(providerB.label);
|
||||
}
|
||||
|
||||
if (providerA.defaultProvider === providerB.defaultProvider) {
|
||||
return 0;
|
||||
} if (providerA.defaultProvider) {
|
||||
if (providerA.defaultProvider) {
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
|
||||
Reference in New Issue
Block a user