vue-typeahead-bootstrap icon indicating copy to clipboard operation
vue-typeahead-bootstrap copied to clipboard

Emit More Events?

Open mattzollinhofer opened this issue 4 years ago • 3 comments

This is a discussion/brainstorm PR at this point. All thoughts are welcome.

Premise

I believe we can provide more a more usable API by bubbling more events up to the users of this component. I'm honestly not sure what those are at this point and am open to suggestions. I'm putting this PR here as a place for me to jot ideas down as I have them and collect suggestions from anyone else who has them. I think that as we work through the issues (#25) and PRs (#23) from the parent repo we might find some ideas for this as well.

Currently Documented Events

  • hit
  • input (does this really count as an "event"?)

Possible Events to Emit

  • various keypresses (enter, esc, arrows, tab, etc)
  • closed - when the dropdown is closed

mattzollinhofer avatar Apr 09 '20 18:04 mattzollinhofer

I'd be in favor of dropdown closed, or at least some sort of blur event. I have a case where I'd like to revert the displayed value to the initially selected value if the user focuses the input text, clears it, and then it loses focus.

skrenek avatar Oct 16 '20 14:10 skrenek

I think we should support most of the popular events of an input, such as focus, blur, change, keyup, keydown.

huyha85 avatar Mar 11 '21 22:03 huyha85

Hey, can we get support for the blur event? @mattzollinhofer

gkkirilov avatar Aug 18 '21 10:08 gkkirilov