vuejs-autocomplete icon indicating copy to clipboard operation
vuejs-autocomplete copied to clipboard

Emit selected object on Enter

Open nightillusions opened this issue 6 years ago • 2 comments

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

nightillusions avatar Jun 18 '18 08:06 nightillusions

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

coveralls avatar Jun 18 '18 08:06 coveralls

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')

charliekassel avatar Jun 18 '18 12:06 charliekassel