-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can a get a "selected" event when a suggested item is selected from list? #27
Comments
Can you elaborate? |
Yes, thank you! I want to use $http to fetch a list of results based on a few form fields. For simplicity, let's say we want to search for friends: Home town _____________ (uses allmighty-autocomplete) I want this form to update results when anything is changed -- but not with every on-type event in the hometown field -- only when a real city is selected from the list of autocomplete suggestions. Any way to do this? |
That functionality it's not implemented yet, but it could be easily incorporated. You could add a callback around here. |
Thanks so much for the response — I’ll see what I can do. Meanwhile perhaps you can consider this an official “feature request” :-) Thanks! On May 13, 2014, at 4:47 PM, Chuck notifications@github.com wrote:
|
Would you be so kind as to point me a bit further in the right direction? I tried calling my controller method directly from the point in the code where you showed me -- bit the method can't be found. I suspect it's out of scope but not sure how to address it properly. I'm simply trying to run a method named "updateProviders()" which is in my formCtrl controller. Any tips for an NG newbie? Thanks :-) |
You're right, the function it's out of the scope, you need to make a connection between your app's scope and this directive. You can add a new attribute to specify the function to be referenced, and the invoking it where you need it. You can see that exact example with the on-type parameter in the directive attributes. |
Hey @df-sean, what did you end up using? If you haven't done it yet, I could give it a shot. |
Thank you so much for following up. A few hours ago, I followed your example and managed to get it going. Thanks again! |
Cool, you should send a pull request, it would be really useful to have that functionality. |
Pull request issued — cheers! |
No description provided.
The text was updated successfully, but these errors were encountered: