Table: fix highlightCurrentRow regression (#11691)

pull/11702/head
Jikkai Xiao 2018-06-21 16:14:06 +08:00 committed by GitHub
parent 0ed8d18603
commit 97a72d3af6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -193,10 +193,10 @@ TableStore.prototype.mutations = {
changeSortCondition(states, options) {
states.data = sortData((states.filteredData || states._data || []), states);
const el = this.table.$el;
if (el) {
const { $el, highlightCurrentRow } = this.table;
if ($el && highlightCurrentRow) {
const data = states.data;
const tr = el.querySelector('tbody').children;
const tr = $el.querySelector('tbody').children;
const rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
const row = rows[data.indexOf(states.currentRow)];