Table: remove highlight class after data change (#1977)

pull/1471/merge
杨奕 2016-12-26 16:07:14 +08:00 committed by FuryBean
parent 05a442f694
commit 441f4c31a9
1 changed files with 2 additions and 0 deletions

View File

@ -95,6 +95,8 @@ export default {
const newRow = rows[data.indexOf(newVal)];
if (oldRow) {
oldRow.classList.remove('current-row');
} else if (rows) {
[].forEach.call(rows, row => row.classList.remove('current-row'));
}
if (newRow) {
newRow.classList.add('current-row');