In my app I use angular-bootstrap typeahead component, this way:
<input type="text" ng-model="selected" placeholder="Start typing to select an object" uib-typeahead="obj as obj.name for obj in objectList | filter:{name:$viewValue}" class="form-control" typeahead-show-hint="true" typeahead-min-length="0" />
Everything works well, but users feel it is inconvenient to focus & clear the input field to see the full list of suggestions again. So I want to add a feature: clear the input field once user focuses it and show the suggestion list again. But doing it the naive way:
<input ... ng-click="selected = null;" />
or
<input ... ng-focus="selected = null;" />
doesn't work - typeahead simply stops working. Is there any solution? Thank you.