Skip to content

[AutoComplete] Support onFocus and onBlur events propagation#3101

Closed
zandroid wants to merge 2 commits intomui:masterfrom
zandroid:master
Closed

[AutoComplete] Support onFocus and onBlur events propagation#3101
zandroid wants to merge 2 commits intomui:masterfrom
zandroid:master

Conversation

@zandroid
Copy link
Copy Markdown

It's required to use onFocus and onBlur events over AutoComplete component:
<AutoComplete ... onFocus={this._handleInputFocus} onBlur={this._handleInputBlur} />

These events are propagated to TextField from AutoComplete props but are overwritten by custom handlers. So we need to support them obviously.

@zandroid zandroid changed the title Support onFocus and onBlur propagation for AutoComplete [AutoComplete] Support onFocus and onBlur events propagation Jan 30, 2016
@newoga
Copy link
Copy Markdown
Contributor

newoga commented Feb 1, 2016

@zandroid I'm not sure if this is as simple as it looks yet. I started this effort once when I started working with the project but the <AutoComplete/> is currently written in a way where the focus has to be reset each time the input changes. It leads to these events being called excessively. We could add these but it may not work the way you think it does. Maybe you can try it a bit and see if it still has that behavior.

@zandroid
Copy link
Copy Markdown
Author

zandroid commented Feb 1, 2016

@newoga Probably you are right. I am using warkaround right now:
<div onBlur={...}><AutoComplete ... /></div>
And sometimes it works strange. I will take a look at this fix more detailed.

@newoga
Copy link
Copy Markdown
Contributor

newoga commented Feb 1, 2016

@zandroid Feel free to quickly review this PR: #2338

Ultimately we'll probably have to improve the way focus is handled in the <Menu /> component to solve this once and for all.

@oliviertassinari
Copy link
Copy Markdown
Member

@zandroid Thanks for opening this PR but the issue is now closed with #3356.

@zannager zannager added the scope: autocomplete Changes related to the autocomplete. This includes ComboBox. label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: autocomplete Changes related to the autocomplete. This includes ComboBox.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants