AngularJS Typeahead To Always Show

1.1k views Asked by At

I am using the AngularJS typeahead directive to iterate over an array of objects which has been populated before-hand by an API, so that the typeahead is pulling all information from memory.

I would like that when the input gains focus, the typeahead is shown with all available results, even when there is no value in the input.

I found this simple JSFiddle for a typeahead that we can use to test with.

I've tried using:

<input typeahead-min-length="0" class="form-control input-sm" ng-model="query" typeahead="warehouse.info for warehouse in warehouses | filter:$viewValue" typeahead-on-select="selectedWarehouse = $item;" ng-keypress="fetchWarehouses();"/>

..thinking that the attribute typeahead-min-length="0" could accomplish this, but it didn't.

Any ideas? Thanks!

0

There are 0 answers