-
Notifications
You must be signed in to change notification settings - Fork 7
fix(oui-select-picker): update when model changes #378
Conversation
| } | ||
| } | ||
|
|
||
| this.$scope.$watch("$ctrl.model", (newValue) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This cannot be made through $onChanges hook ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No it doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because of the binding of the model (=) :)
Could you prefer using a function instead ?
| this.$scope.$watch("$ctrl.model", (newValue) => { | |
| this.$scope.$watch(() => this.model, (newValue) => { |
| } | ||
| } | ||
|
|
||
| this.$scope.$watch("$ctrl.model", (newValue) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's because of the binding of the model (=) :)
Could you prefer using a function instead ?
| this.$scope.$watch("$ctrl.model", (newValue) => { | |
| this.$scope.$watch(() => this.model, (newValue) => { |
c1f51a0 to
49f65f7
Compare
fix(oui-select-picker): update when model changes
Description of the Change
c1f51a0 — fix(oui-select-picker): update when model changes
/cc @jleveugle @frenautvh @antleblanc @marie-j @AxelPeter