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

feat(autocomplete): Submit form on enter #1530

Closed
MattKetmo opened this issue Feb 16, 2015 · 0 comments
Closed

feat(autocomplete): Submit form on enter #1530

MattKetmo opened this issue Feb 16, 2015 · 0 comments
Assignees
Milestone

Comments

@MattKetmo
Copy link

Hello,

Is it possible that the autocomplete input acts like a standard input text when pressing the Enter key, to submit the form it belongs to?
I guess this behavior should only be enabled when the focus is on the input text and not on the suggestions.

What you think?

<form ng-submit="doSubmit(searchText)">
  <md-autocomplete md-search-text="searchText" md-items="item in getMatches(searchText)">
    <span md-highlight-text="searchText">{{item}}</span>
  </md-autocomplete>

  <md-button class="md-raised" type="submit">
    Submit
  </md-button>
</form>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants