From fb79e2cfb2a7b9b7fb6b5bdad77731a5587f3f26 Mon Sep 17 00:00:00 2001 From: karwosts <32912880+karwosts@users.noreply.github.com> Date: Thu, 23 Jan 2025 03:15:23 -0800 Subject: [PATCH] Fix keyboard for ha-config-entities bulk menus (#23776) Fix keyboard for ha-config-entities menus --- .../config/entities/ha-config-entities.ts | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/panels/config/entities/ha-config-entities.ts b/src/panels/config/entities/ha-config-entities.ts index a204baca0e8c..c8eb2c4fbba2 100644 --- a/src/panels/config/entities/ha-config-entities.ts +++ b/src/panels/config/entities/ha-config-entities.ts @@ -729,7 +729,7 @@ export class HaConfigEntities extends SubscribeMixin(LitElement) { `; })} - +
${this.hass.localize("ui.panel.config.labels.add_label")}
+
${this.hass.localize( @@ -852,7 +852,7 @@ ${ )}
- + - + - + - + { showConfirmationDialog(this, { title: this.hass.localize( "ui.panel.config.entities.picker.enable_selected.confirm_title", @@ -1191,9 +1191,9 @@ ${ } }, }); - } + }; - private _disableSelected() { + private _disableSelected = () => { showConfirmationDialog(this, { title: this.hass.localize( "ui.panel.config.entities.picker.disable_selected.confirm_title", @@ -1213,9 +1213,9 @@ ${ this._clearSelection(); }, }); - } + }; - private _hideSelected() { + private _hideSelected = () => { showConfirmationDialog(this, { title: this.hass.localize( "ui.panel.config.entities.picker.hide_selected.confirm_title", @@ -1235,16 +1235,16 @@ ${ this._clearSelection(); }, }); - } + }; - private _unhideSelected() { + private _unhideSelected = () => { this._selected.forEach((entity) => updateEntityRegistryEntry(this.hass, entity, { hidden_by: null, }) ); this._clearSelection(); - } + }; private async _handleBulkLabel(ev) { const label = ev.currentTarget.value; @@ -1286,7 +1286,7 @@ ${rejected } } - private _bulkCreateLabel() { + private _bulkCreateLabel = () => { showLabelDetailDialog(this, { createEntry: async (values) => { const label = await createLabelRegistryEntry(this.hass, values); @@ -1294,9 +1294,9 @@ ${rejected return label; }, }); - } + }; - private async _removeSelected() { + private _removeSelected = async () => { if (!this._entities || !this.hass) { return; } @@ -1369,7 +1369,7 @@ ${rejected this._clearSelection(); }, }); - } + }; private _clearSelection() { this._dataTable.clearSelection();