-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
[AutoComplete] component doesn't select first item by down arrow after clicking on it #4922
Comments
I can confirm that this happens on both Steps to reproduce:
Expected: First item gets highlighted An extra arrow press takes you to the second element, as was pointed out by @yavalvas |
Tried to make progress on this tonight. I added a keyDown handler to the menu from the auto complete to watch for "up" keycode. I got stuck when trying to focus the TextField. I tried .close and setState with focusTextField: true. Any ideas? |
+1, issue remains despite #4193 |
The AutoComplete component does not set it's child onKeyDown() {
this.autoComplete.refs.menu.setState({
isKeyboardFocused: true,
});
}
render() {
return (
<AutoComplete onKeyDown={this.onKeyDown.bind(this)}
ref={ref => this.autoComplete = ref}
.... />
.... |
+1 I have noticed the same bug. |
Closed by #4783 |
Problem description
After updating to new 0.15.3 version I've found an issue with AutoComplete component, when you click on AutoComplete text field and after that try to go by down arrow to first opened item it won't go there, after two clicks it goes to second item in opened menu. When I go to AutoComplete's field by tab action it works good for this case.
Steps to reproduce
I have following component
<AutoComplete filter={AutoComplete.caseInsensitiveFilter} floatingLabelFixed={true} openOnFocus={true} fullWidth={true} dataSource={s_.variables} dataSourceConfig={{text: 'data', value: 'id'}} floatingLabelText="My Field" onNewRequest={(data) => this.selectData(data.id)} onUpdateInput={this.handleUpdateInput.bind(this, "data")} searchText={s_.searchText.data} onFocus={this.setSearchText.bind(this, "data")} />
Versions
Thanks to update for setting of searchText to AutoComplete component, it works good and without dirty hacks with setTimeout!
The text was updated successfully, but these errors were encountered: