Skip to content

Commit c4972f2

Browse files
committed
Improve checking for multiple changes in scope
1 parent af4ab54 commit c4972f2

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/igniteui-angular.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
diff.push({ index: key, txlog: changedVals });
7070
}
7171
}
72+
changedVals = [];
7273
}
7374
if (dirty) {
7475
return false;

test/e2e/scenarios.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,15 @@ describe("my app", function() {
562562
util.executeScript('angular.element("#grid1").scope().$apply();');
563563
expect(util.getResult('$("#grid1_fixed tbody tr:eq(0) td")[0].innerHTML')).toBe("Tea");
564564
expect(util.getResult('$("#grid1 tbody tr:eq(0) td")[0].innerHTML')).toBe("1");
565+
util.executeScript('angular.element("#grid1").scope().northwind[1].ProductName = "Beer";');
566+
util.executeScript('angular.element("#grid1").scope().northwind[2].UnitsOnOrder = 2;');
567+
util.executeScript('angular.element("#grid1").scope().$apply();');
568+
expect(util.getResult('$("#grid1_fixed tbody tr:eq(1) td")[0].innerHTML')).toBe("Beer");
569+
//the other values should be preserved
570+
expect(util.getResult('$("#grid1_fixed tbody tr:eq(2) td")[0].innerHTML')).toBe("Aniseed Syrup");
571+
expect(util.getResult('$("#grid1 tbody tr:eq(2) td")[2].innerHTML')).toBe("2");
572+
//the other values should be preserved
573+
expect(util.getResult('$("#grid1 tbody tr:eq(1) td")[2].innerHTML')).toBe("24 - 12 oz bottles");
565574
});
566575
});
567576

0 commit comments

Comments
 (0)