Table: retain currently selected row when expanding row (#11464)

pull/11485/head
Jikkai Xiao 2018-06-04 11:34:37 +08:00 committed by hetech
parent 96df89eca8
commit 8c1b4d827d
1 changed files with 2 additions and 1 deletions

View File

@ -267,7 +267,8 @@ export default {
},
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) {
classes.push('el-table__row--striped');