Skip to content

Commit

Permalink
Fixed #5057 - DataTable: persistent expandedRows with dataKey doesn't…
Browse files Browse the repository at this point in the history
… working properly
  • Loading branch information
mertsincan committed Jan 15, 2024
1 parent b843bc9 commit 1fcefea
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/lib/datatable/BodyRow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,11 @@ export default {
};
},
watch: {
expandedRows(newValue) {
this.d_rowExpanded = this.dataKey ? newValue?.[ObjectUtils.resolveFieldData(this.rowData, this.dataKey)] !== undefined : newValue?.some((d) => this.equals(this.rowData, d));
expandedRows: {
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: {
Expand Down

0 comments on commit 1fcefea

Please sign in to comment.