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 More Events? #28

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

Emit More Events? #28

wants to merge 1 commit into from

Conversation

mattzollinhofer
Copy link
Owner

@mattzollinhofer mattzollinhofer commented Apr 9, 2020

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 mattzollinhofer mentioned this pull request Apr 9, 2020
@skrenek
Copy link

skrenek commented Oct 16, 2020

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.

@huyha85
Copy link

huyha85 commented Mar 11, 2021

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

@gkkirilov
Copy link

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

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.

4 participants