Fix uncaught keyFunction errors when data table filtering (#20285)
* Undefined keys * Apply suggestion Co-authored-by: Bram Kragten <mail@bramkragten.nl> * Prettier --------- Co-authored-by: Bram Kragten <mail@bramkragten.nl>
This commit is contained in:
parent
f13dcb4139
commit
f3ba6e7996
|
@ -386,7 +386,7 @@ export class HaDataTable extends LitElement {
|
|||
`;
|
||||
}
|
||||
|
||||
private _keyFunction = (row: DataTableRowData) => row[this.id] || row;
|
||||
private _keyFunction = (row: DataTableRowData) => row?.[this.id] || row;
|
||||
|
||||
private _renderRow = (row: DataTableRowData, index: number) => {
|
||||
// not sure how this happens...
|
||||
|
|
Loading…
Reference in New Issue