Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

search-enabled is not dynamic #505

Closed
hansede opened this issue Dec 12, 2014 · 1 comment
Closed

search-enabled is not dynamic #505

hansede opened this issue Dec 12, 2014 · 1 comment

Comments

@hansede
Copy link

hansede commented Dec 12, 2014

In spite of the following code:

scope.$watch("searchEnabled", . . .

search-enabled is not dynamic and does not respond to changes on the bound scope variable. For example, if I set search-enabled="my_var", then on my scope I change $scope.my_var from false to true, this does not trigger the search box to be visible.

@Devqon
Copy link

Devqon commented Feb 2, 2016

+1, what is the status on this?

BrianLenzo pushed a commit to BrianLenzo/ui-select that referenced this issue Jul 7, 2016
…er than scope property

searchEnabled was not reacting to changes in it's value.  This is because searchEnabled has a scope.$watch on it but searchEnabled was set as a property on $select not the scope and the watch would never fire.  Now the watch evaluates the attrs.searchEnabled for changes and properly reacts to changes in it's value.

Closes angular-ui#505
user378230 pushed a commit that referenced this issue Jul 7, 2016
`searchEnabled` was not reacting to changes in it's value.
  
This was because searchEnabled has a scope.$watch on it but searchEnabled
was set as a property on $select not the scope and the watch would never 
fire.  

This commit now changes the watch so it the attrs.searchEnabled for changes 
and properly reacts to changes in it's value.

Closes #505
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants