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

[SelectField] onFocus and onBlur not being called #3151

Closed
shilpan opened this issue Feb 3, 2016 · 12 comments
Closed

[SelectField] onFocus and onBlur not being called #3151

shilpan opened this issue Feb 3, 2016 · 12 comments
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!

Comments

@shilpan
Copy link

shilpan commented Feb 3, 2016

My code is as follows:

<SelectField
    onFocus={() => console.log('focus')}>
    {
         [<MenuItem/>]
    }
</SelectField>
@mbrookes mbrookes changed the title onFocus and onBlur not being called for SelectField and Autocomplete [SelectField][AutoComplete] onFocus and onBlur not being called Feb 3, 2016
@wzup
Copy link

wzup commented Feb 19, 2016

Same story here, onFocus is not called for SelectField.

@oliviertassinari What does it mean onFocus event are now emitted on the AutoComplete component? Could you please elaborate on how AutoComplete is connected to SelectField? Should I use AutoComplete along with SelectField in order to get onFocus to work in SelectField? How? Could you please draw an example?

@oliviertassinari
Copy link
Member

@wzup I'm gonna remove AutoComplete references from this issue. The two components are not linked.

@oliviertassinari oliviertassinari changed the title [SelectField][AutoComplete] onFocus and onBlur not being called [SelectField] onFocus and onBlur not being called Feb 19, 2016
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Feb 19, 2016
@wbprice
Copy link

wbprice commented Mar 25, 2016

@shilpan were you able to find a workaround for this issue?

@laispace
Copy link

hi, what about this issue now?

@sijanonly
Copy link

Is the issue resolved ?

@oliviertassinari
Copy link
Member

Is the issue resolved?

No, I don't think so.

@kelsonic
Copy link

kelsonic commented Feb 6, 2017

Is the issue resolved ?

Still no? ... For those of you that need that functionality, I tried out react-select and it satisfied our business needs.

@alicerocheman
Copy link

no onFocus, no onClick...

@efeminella
Copy link

Yeah, I am trying to implement onBlur against a SelectField, but to no avail :(

@oliviertassinari oliviertassinari added the component: select This is the name of the generic UI component, not the React module! label Mar 26, 2017
@MathieuLorber
Copy link

I temporarily resolved the problem by setting onBlur on all my MenuItems... (for onBlur only, I didn't check for onFocus).

Still, it's not perfect. Depending on the zone of the click, onBlur can be directly called, and my error message is visually displayed quicker than the MenuItems =/

@alicerocheman onClick is ok for me

@davidrenne
Copy link

I am having this issue as well!

@BernardoFBBraga
Copy link

BernardoFBBraga commented Jun 29, 2017

I'm having this issue as well.
I'm using @MathieuLorber 's technique inserting onBlur on the menuItens and also using onBlur on the SelectField

for the focus, I got onClick for clicking focus and onFocusCapture on a parent div for keyboard focus

Clicking on the arrow fires both handlers, clicking anywhere else only fires onClick

a very ugly workaround and you'll get many unnecessary calls, but it may help someone desperate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module!
Projects
None yet
Development

No branches or pull requests