fix click handlers on data tables (#5087)

This commit is contained in:
David F. Mulcahey 2020-03-06 07:45:12 -05:00 committed by GitHub
parent 720bd03173
commit e63723f39e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -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 });
} }
} }

View File

@ -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}`);
} }
} }