fix click handlers on data tables (#5087)

This commit is contained in:
David F. Mulcahey
2020-03-06 13:45:12 +01:00
committed by GitHub
parent 720bd03173
commit e63723f39e
2 changed files with 6 additions and 6 deletions
@@ -101,9 +101,9 @@ export class ZHADevicesDataTable extends LitElement {
}
private async _handleClicked(ev: CustomEvent) {
const ieee = (ev.target as HTMLElement)
.closest("tr")!
.getAttribute("data-row-id")!;
const ieee = ((ev.target as HTMLElement).closest(
".mdc-data-table__row"
) as any).rowId;
showZHADeviceInfoDialog(this, { ieee });
}
}
@@ -110,9 +110,9 @@ export class ZHAGroupsDataTable extends LitElement {
}
private _handleRowClicked(ev: CustomEvent) {
const groupId = (ev.target as HTMLElement)
.closest("tr")!
.getAttribute("data-row-id")!;
const groupId = ((ev.target as HTMLElement).closest(
".mdc-data-table__row"
) as any).rowId;
navigate(this, `/config/zha/group/${groupId}`);
}
}