You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 2, 2019. It is now read-only.
I need to query an API for list of suggestions as the user is typing (initially my selectbox is empty). I believe I should be able to $watch the entered value. There's $select.search used as a filter so I think I should $watch this value in order to trigger the API call.
Is such a possibility already there? If yes, how do I achieve that?
The text was updated successfully, but these errors were encountered:
For the time being I have "solved" this by placing an $emit inside the ui-select directive (obviously, I'm using it locally, not from a CDN) and then listening for an event in my controller.
Since the event is placed within a $watch function for $select.search, the event is fired whenever the value changes.
I need to somehow override the directive itself so I'm able to keep the event outside it, to be safe for future updates as well as for being able to use CDN version.
You could use your own function to populate the choices based on $select.search. Check this comment. Also the first at the demo you can check the first example that is calling an external API
I need to query an API for list of suggestions as the user is typing (initially my selectbox is empty). I believe I should be able to $watch the entered value. There's $select.search used as a filter so I think I should $watch this value in order to trigger the API call.
Is such a possibility already there? If yes, how do I achieve that?
The text was updated successfully, but these errors were encountered: