Skip to content

Commit

Permalink
Table: fix ElemeFE#4692
Browse files Browse the repository at this point in the history
table[highlight-current-row] with column[type=expand] will highlight wrong row
  • Loading branch information
mu-yu authored and Leopoldthecoder committed May 15, 2017
1 parent 3bdeb59 commit 3fb5131
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/table/src/table-body.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export default {
on-contextmenu={ ($event) => this.handleContextMenu($event, row) }
on-mouseenter={ _ => this.handleMouseEnter($index) }
on-mouseleave={ _ => this.handleMouseLeave() }
class={ [this.getRowClass(row, $index)] }>
class={ ['el-table__row', this.getRowClass(row, $index)] }>
{
this._l(this.columns, (column, cellIndex) =>
<td
Expand Down Expand Up @@ -108,7 +108,7 @@ export default {
const el = this.$el;
if (!el) return;
const data = this.store.states.data;
const rows = el.querySelectorAll('tbody > tr');
const rows = el.querySelectorAll('tbody > tr.el-table__row');
const oldRow = rows[data.indexOf(oldVal)];
const newRow = rows[data.indexOf(newVal)];
if (oldRow) {
Expand Down

0 comments on commit 3fb5131

Please sign in to comment.