Fixed #5057 - DataTable: persistent expandedRows with dataKey doesn't working properly

pull/5098/head
mertsincan 2024-01-15 00:22:18 +00:00
parent b843bc9de3
commit 1fcefea636
1 changed files with 5 additions and 2 deletions

View File

@ -276,8 +276,11 @@ export default {
}; };
}, },
watch: { watch: {
expandedRows(newValue) { expandedRows: {
this.d_rowExpanded = this.dataKey ? newValue?.[ObjectUtils.resolveFieldData(this.rowData, this.dataKey)] !== undefined : newValue?.some((d) => this.equals(this.rowData, d)); immediate: true,
handler(newValue) {
this.d_rowExpanded = this.dataKey ? newValue?.[ObjectUtils.resolveFieldData(this.rowData, this.dataKey)] !== undefined : newValue?.some((d) => this.equals(this.rowData, d));
}
} }
}, },
methods: { methods: {