Skip to content

Commit a882ce7

Browse files
Martin PavlovMartin Pavlov
authored andcommitted
Fixing duplicate event firing
Fixes #167
1 parent 25e383f commit a882ce7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

src/igniteui.angular2.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,12 +1205,12 @@ export class IgControlBase<Model> implements DoCheck {
12051205
}
12061206
}
12071207

1208-
optionChange() {
1208+
optionChange(options?) {
12091209
if (this._differ != null) {
12101210
var diff = [];
12111211
var element = jQuery(this._el);
12121212
var i, j, valKey = this._config.valueKey, option;
1213-
var opts = jQuery.extend(true, {}, this._config);
1213+
var opts = options || jQuery.extend(true, {}, this._config);
12141214
if (opts.dataSource) {
12151215
delete opts.dataSource;
12161216
}
@@ -1443,7 +1443,16 @@ export class IgGridBase<Model> extends IgControlBase<Model> implements AfterCont
14431443
}
14441444
}
14451445
}
1446-
allRows(){ };
1446+
allRows() { };
1447+
1448+
optionChange(options?) {
1449+
var opts = options || jQuery.extend(true, {}, this._config);
1450+
// Columns are modified internally by the grid. Excluding them from the change detection
1451+
if (opts.columns) {
1452+
delete opts.columns;
1453+
}
1454+
super.optionChange(opts);
1455+
}
14471456
}
14481457

14491458
@Component({

0 commit comments

Comments
 (0)