ngbolt / ng-bolt

Front-end framework built on AngularJS for rapid development of responsive web applications.
https://ngbolt.github.io
Other
4 stars 2 forks source link

Is there a way to model the text input of a searchable dropdown? #52

Open mgramigna opened 7 years ago

mgramigna commented 7 years ago

Is there a way to watch for changes of the text typed into a searchable dropdown in addition to the value selected?

mgramigna commented 7 years ago

This is what I came up with. Is there a better way?

$scope.$watch(function() {
  return ctrl.mainForm.testDropdown.$viewValue
}, function(model) {
  // do something with the value
}, true)