mirror of https://github.com/ElemeFE/element
Table: fix highlightCurrentRow regression (#11691)
parent
0ed8d18603
commit
97a72d3af6
|
@ -193,10 +193,10 @@ TableStore.prototype.mutations = {
|
||||||
changeSortCondition(states, options) {
|
changeSortCondition(states, options) {
|
||||||
states.data = sortData((states.filteredData || states._data || []), states);
|
states.data = sortData((states.filteredData || states._data || []), states);
|
||||||
|
|
||||||
const el = this.table.$el;
|
const { $el, highlightCurrentRow } = this.table;
|
||||||
if (el) {
|
if ($el && highlightCurrentRow) {
|
||||||
const data = states.data;
|
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 rows = [].filter.call(tr, row => hasClass(row, 'el-table__row'));
|
||||||
const row = rows[data.indexOf(states.currentRow)];
|
const row = rows[data.indexOf(states.currentRow)];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue