Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset current selection when items are reset #52

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yunyu
Copy link

@yunyu yunyu commented May 21, 2017

I'm currently using this component in a pseudo-form that allows the user to submit the form if the input field receives an enter (not the autocomplete popup). I'm doing this by implementing a processEnter method based off of the onHit method:

    processEnter() {
      if (this.current !== -1) {
        this.onHit(this.items[this.current]);
      } else {
        this.$emit('pressed:enter');
      }
    }

Currently, onHit will be called instead of emitting the enter press event after a reset(). This commit fixes that behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant