mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
fix(core-ui): options panel close behavior
This commit is contained in:
@@ -36,7 +36,11 @@ export class OptionsPanelService {
|
||||
}
|
||||
|
||||
async open(component: () => React.FC): Promise<void> {
|
||||
if (!(await this.close(component))) {
|
||||
if (component === this.panelComponent) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!(await this.close())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -44,8 +48,8 @@ export class OptionsPanelService {
|
||||
this.active = true;
|
||||
}
|
||||
|
||||
async close(component: () => React.FC): Promise<boolean> {
|
||||
if (component !== this.panelComponent || this.panelComponent === null) {
|
||||
async close(): Promise<boolean> {
|
||||
if (this.panelComponent === null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -30,6 +30,6 @@ export class PublicConnectionFormService {
|
||||
|
||||
async close(): Promise<void> {
|
||||
this.connectionId = null;
|
||||
await this.optionsPanelService.close(formGetter);
|
||||
await this.optionsPanelService.close();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user