Skip to content

Commit

Permalink
Fix onCrmUiSelect to use current scope and apply to the digest cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Jul 16, 2021
1 parent 13501d5 commit 2db38fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ang/crmUi.js
Original file line number Diff line number Diff line change
Expand Up @@ -643,7 +643,9 @@
element.on('select2-selecting', function(e) {
e.preventDefault();
element.select2('close').select2('val', '');
scope.$parent.$eval(attrs.onCrmUiSelect, {selection: e.val});
scope.$apply(function() {
scope.$eval(attrs.onCrmUiSelect, {selection: e.val});
});
});
}
};
Expand Down

0 comments on commit 2db38fb

Please sign in to comment.