mirror of https://github.com/ElemeFE/element
Table: retain currently selected row when expanding row (#11464)
parent
96df89eca8
commit
8c1b4d827d
|
@ -267,7 +267,8 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
getRowClass(row, rowIndex) {
|
getRowClass(row, rowIndex) {
|
||||||
const classes = ['el-table__row'];
|
const currentRow = this.store.states.currentRow;
|
||||||
|
const classes = currentRow === row ? ['el-table__row', 'current-row'] : ['el-table__row'];
|
||||||
|
|
||||||
if (this.stripe && rowIndex % 2 === 1) {
|
if (this.stripe && rowIndex % 2 === 1) {
|
||||||
classes.push('el-table__row--striped');
|
classes.push('el-table__row--striped');
|
||||||
|
|
Loading…
Reference in New Issue