diff --git a/src/modules/pages/connection/list/list_item/list_item.model.ts b/src/modules/pages/connection/list/list_item/list_item.model.ts index 96b0f53..cc4fc11 100644 --- a/src/modules/pages/connection/list/list_item/list_item.model.ts +++ b/src/modules/pages/connection/list/list_item/list_item.model.ts @@ -70,6 +70,13 @@ export class ListItemModel extends Model<{ const connection = this.model.connections.find(item => item.connectionName === oldName); connection.connectionId = oldName; connection.connectionName = newName; + this.model.connections = this.model.connections.map(item => { + return { + ...item, + connectionName: item.connectionName === oldName ? newName : item.connectionName, + connectionId: oldName, + }; + }); return api.updateConnection(connection); }, diff --git a/src/modules/pages/connection/list/list_item/list_item.ts b/src/modules/pages/connection/list/list_item/list_item.ts index 879c454..e101629 100644 --- a/src/modules/pages/connection/list/list_item/list_item.ts +++ b/src/modules/pages/connection/list/list_item/list_item.ts @@ -68,7 +68,7 @@ export class ListItem extends BI.BasicButton { action: () => { const newName = this.nameEditor.getValue(); this.store.changeName(name, newName).then(() => { - this.store.setIsEdit(false); + this.store.setIsEdit(false, name); this.nameLabel.setText(newName); }); }, @@ -227,7 +227,7 @@ export class ListItem extends BI.BasicButton { }); }, changeName: () => { - this.store.setIsEdit(true); + this.store.setIsEdit(true, name); }, copy: () => { this.store.setConnectionSelected(name);