Skip to content
This repository was archived by the owner on Aug 7, 2020. It is now read-only.

Commit a59bf96

Browse files
cbourgoisAxelPeter
authored andcommitted
fix(oui-select-picker): update when model changes (#378)
1 parent b8736c1 commit a59bf96

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/oui-select-picker/src/select-picker.controller.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ export default class SelectPickerController {
3838
}
3939
}
4040

41+
this.$scope.$watch(() => this.model, (newValue) => {
42+
if (this.model && find(this.values, newValue)) {
43+
this.selectedValue = newValue;
44+
}
45+
});
46+
4147
this.sectionTransclude = this.$transclude.isSlotFilled("sectionSlot");
4248
this.deprecatedTransclude = this.$transclude.isSlotFilled("deprecatedSlot");
4349
}

0 commit comments

Comments
 (0)