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

onOptionSelected does not trigger on click #205

Open
amitava82 opened this issue Jun 16, 2016 · 4 comments
Open

onOptionSelected does not trigger on click #205

amitava82 opened this issue Jun 16, 2016 · 4 comments

Comments

@amitava82
Copy link

2.0.0-alpha.5
Only keyboard event works

@zdhickman
Copy link
Contributor

zdhickman commented Jun 26, 2016

FYI HubSpot#6 has a quick workaround that uses onMouseDown instead of onClick to check for clicks on options. If this is still appropriate behavior for the typeahead, I can patch to this repo

@em0ney
Copy link

em0ney commented Aug 31, 2016

I had this issue, but in my case, I was trying to hide results onBlur. The blur was firing before the selection was made. Just putting that here incase it helps you or anyone else

@jennykortina
Copy link

@zdhickman is there anyway to get an onlick or onmousedown event right now? I tried both and neither work? I'm using css to expand/contract the search box on focus, which isn't allowing me to use onclick to send the typeahead slection

@mateuspontes
Copy link

I had this issue, I fixed with a setTimeout while they patch a better solution.

onBlur(e) {
    e.stopPropagation();
    e.preventDefault();
    setTimeout(() => {
        if (this.refs.typeahead.state['showResults']) this.refs.typeahead.setState({showResults: false})
    }, 150);
}

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

No branches or pull requests

5 participants