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

typeahead close select on form submit #3545

@ayeletdn

Description

@ayeletdn

I would like to get the select list to close when the form is submitted with a value which is not on the list (using typeahead-focus-first set to false).
I used the typeahead plunker example as a starting point.

When the user hits enter, the storeItem function fires, but the list does not close.

    <form ng-submit="storeItem()">
      <input type="text"
        typeahead="state for state in states | filter:$viewValue | limitTo:8" 
        typeahead-focus-first="false"/>
    </form>

The full function:

    $scope.storeItem = function() {
       $scope.selected = Date.now();
    };

See full plunker here

If this is not an issue, and you have an idea for a workaround, I'd appreciate if you could answer this SO question

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions