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

Emit selected object on Enter #49

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

Conversation

nightillusions
Copy link

Changed the emit of the enter event, to also return the selected object (like the select() method).

Changed the emit of the `enter` event, to also return the selected object (like the select() method).
@coveralls
Copy link

Pull Request Test Coverage Report for Build 29

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 96.244%

Totals Coverage Status
Change from base Build 26: 0.0%
Covered Lines: 150
Relevant Lines: 153

💛 - Coveralls

@charliekassel
Copy link
Owner

Hi, thanks for you contribution - happy to support this but it looks like you need to update the tests to reflect this change.
Also while you are there we should emit the same object as click selecting as seen here:
https://github.com/charliekassel/vuejs-autocomplete/blob/master/src/components/Autocomplete.vue#L334-L337

Tests: https://github.com/charliekassel/vuejs-autocomplete/blob/master/test/unit/specs/ResultsInteraction.spec.js#L127

Test can then be updated to expect(wrapper.emitted().enter[0][0].value).toEqual('abc')

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.

3 participants