mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-23 17:26:42 +00:00
fix click handlers on data tables (#5087)
This commit is contained in:
parent
720bd03173
commit
e63723f39e
@ -101,9 +101,9 @@ export class ZHADevicesDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async _handleClicked(ev: CustomEvent) {
|
private async _handleClicked(ev: CustomEvent) {
|
||||||
const ieee = (ev.target as HTMLElement)
|
const ieee = ((ev.target as HTMLElement).closest(
|
||||||
.closest("tr")!
|
".mdc-data-table__row"
|
||||||
.getAttribute("data-row-id")!;
|
) as any).rowId;
|
||||||
showZHADeviceInfoDialog(this, { ieee });
|
showZHADeviceInfoDialog(this, { ieee });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,9 +110,9 @@ export class ZHAGroupsDataTable extends LitElement {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _handleRowClicked(ev: CustomEvent) {
|
private _handleRowClicked(ev: CustomEvent) {
|
||||||
const groupId = (ev.target as HTMLElement)
|
const groupId = ((ev.target as HTMLElement).closest(
|
||||||
.closest("tr")!
|
".mdc-data-table__row"
|
||||||
.getAttribute("data-row-id")!;
|
) as any).rowId;
|
||||||
navigate(this, `/config/zha/group/${groupId}`);
|
navigate(this, `/config/zha/group/${groupId}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user