fix(core-connections): connection name can't be changed

This commit is contained in:
Wroud
2020-10-15 21:49:22 +03:00
parent fb29bd48b6
commit 911049472f
@@ -60,7 +60,7 @@ implements IInitializableController {
): Promise<void> => this.loadDriver(driverId, prevValue);
onFormChange = (value?: unknown, name?: string): void => {
this.updateName();
this.updateName(name);
this.resetPassword(name || '');
};
@@ -124,7 +124,11 @@ implements IInitializableController {
this.updateName();
}
private updateName() {
private updateName(name?: string) {
if (name === 'name') {
return;
}
const databaseNames = ['New', ...this.drivers.map(driver => driver.name!)]
.filter(Boolean);