Skip to content

Commit 670d0e1

Browse files
author
Nedyalko Nikolov
committed
Merge pull request NativeScript#1221 from NativeScript/nnikolov/TwoWayBindingUpdateIssue
Fixed issue with two way binding update.
2 parents 6ed66b5 + 3c7ed4b commit 670d0e1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

data/observable/observable.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,17 @@ export class Observable implements definition.Observable {
121121
return this[name];
122122
}
123123

124-
private disableNotifications = false;
124+
//private disableNotifications = false;
125+
private disableNotifications = {};
125126

126127
public _setCore(data: definition.PropertyChangeData) {
127-
this.disableNotifications = true;
128+
this.disableNotifications[data.propertyName] = true;
128129
this[data.propertyName] = data.value;
129-
this.disableNotifications = false;
130+
delete this.disableNotifications[data.propertyName];
130131
}
131132

132133
public notify<T extends definition.EventData>(data: T) {
133-
if (this.disableNotifications) {
134+
if (this.disableNotifications[(<any>data).propertyName]) {
134135
return;
135136
}
136137

0 commit comments

Comments
 (0)