From 76d5eaf1944431b2f5fd2018b314ddb14ed93e54 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Fri, 28 Jun 2024 11:41:42 +0000 Subject: [PATCH] Reload application credentials after delete --- .../ha-config-application-credentials.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/panels/config/application_credentials/ha-config-application-credentials.ts b/src/panels/config/application_credentials/ha-config-application-credentials.ts index 644759e148da..d9a8fa39adda 100644 --- a/src/panels/config/application_credentials/ha-config-application-credentials.ts +++ b/src/panels/config/application_credentials/ha-config-application-credentials.ts @@ -84,7 +84,7 @@ export class HaConfigApplicationCredentials extends LitElement { path: mdiDelete, warning: true, label: this.hass.localize("ui.common.delete"), - action: () => this._removeCredential(credential), + action: () => this._deleteCredential(credential), }, ]} > @@ -132,7 +132,7 @@ export class HaConfigApplicationCredentials extends LitElement {
${!this.narrow ? html` - ${this.hass.localize( "ui.panel.config.application_credentials.picker.remove_selected.button" )} @@ -174,7 +174,7 @@ export class HaConfigApplicationCredentials extends LitElement { this._selected = ev.detail.value; } - private _removeCredential = async (credential) => { + private _deleteCredential = async (credential) => { const confirm = await showConfirmationDialog(this, { title: this.hass.localize( `ui.panel.config.application_credentials.picker.remove.confirm_title` @@ -190,9 +190,10 @@ export class HaConfigApplicationCredentials extends LitElement { return; } await deleteApplicationCredential(this.hass, credential.id); + await this._fetchApplicationCredentials(); }; - private _removeSelected() { + private _deleteSelected() { showConfirmationDialog(this, { title: this.hass.localize( `ui.panel.config.application_credentials.picker.remove_selected.confirm_title`, @@ -224,7 +225,7 @@ export class HaConfigApplicationCredentials extends LitElement { return; } this._dataTable.clearSelection(); - this._fetchApplicationCredentials(); + await this._fetchApplicationCredentials(); }, }); }