I am trying to figure out how to close the select list when a form is submitted with a value that is not on the list, using the typeahead-focus-first feature. I started from the typeahead plunker example.
Currently, when the user hits enter and the storeItem function is triggered, the list remains open.
<form ng-submit="storeItem()">
<input type="text"
typeahead="state for state in states | filter:$viewValue | limitTo:8"
typeahead-focus-first="false"/>
</form>
The storeItem function looks like this:
$scope.storeItem = function() {
$scope.selected = Date.now();
};
You can check out the full plunker example here
Any suggestions on how I can close the list while preserving the input value and list contents?