#yeah locally I added
1 messages · Page 1 of 1 (latest)
.id=${this.id} what is this?
IIUC you need to pass an id to to the table that matches one of your column keys, and then the id from the rowclicked returns that element from the row
e.g. I'm looking at the statistics table:
<ha-data-table
.columns=${this._columns(this.hass.localize)}
.data=${this._displayData(this._data)}
noDataText="No statistics"
id="statistic_id"
clickable
@row-click=${this._rowClicked}
.dir=${computeRTLDirection(this.hass)}
></ha-data-table>
statistic_id is one of the column headers, and then the id in _rowClicked is the statistic_id of the row that was clicked