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

feat(typeahead): add noResults indicator binding #2792

Closed
wants to merge 1 commit into from

Conversation

jtreuting
Copy link
Contributor

Added a binding for typeahead-no-results that is similar to the binding for typeahead-loading. I wanted to easily display text below the textbox when no results were found and so this seemed like the cleanest way. Without this, my best solution was to set the flag in my controller each time within the query method when the results are returned.

Usage:

<div>
    <input ng-model="result" typeahead="item for item in loadMatches()" typeahead-loading="isLoading" typeahead-no-results="isNoResults">
    <div ng-show="isLoading">Loading ...</div>
    <div ng-show="isNoResults">No matches found</div>
</div>

@wesleycho
Copy link
Contributor

Can you rebase this off of current master?

@jczerwinski
Copy link
Contributor

Done. See #4068

@wesleycho wesleycho closed this in 647cdd9 Aug 1, 2015
@jtreuting
Copy link
Contributor Author

Great, glad this got pulled in. Thanks.

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

Successfully merging this pull request may close these issues.

4 participants