Skip to content
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.

Always open auto-complete menu on click #57

Closed
marcacyr opened this issue Dec 13, 2016 · 7 comments
Closed

Always open auto-complete menu on click #57

marcacyr opened this issue Dec 13, 2016 · 7 comments
Assignees

Comments

@marcacyr
Copy link

qelqfiwcyu

Description of gif:

Click on the input, menu opens first time. Make a selection. Focus returned to input, chip added successfully, but the menu does not reopen.

The issue I'm running into is that when clicking in the autocomplete box, the menu opens correctly the first time. After clicking, or keying down to and selecting, an option the chip is added correctly, and focus is returned to the autocomplete input, but the menu does not reopen until the user hits a keyboard key (any key does the trick, but they must hit a key). Clicking again doesn't re-open the menu. No action other than a keydown/keyup on the keyboard does the trick.

I've been digging through the module code and I see the places where focus is returned to the AutoComplete component. Theoretically, this should do the trick but it isn't. I can't for the life of me figure out why the menu is not reopening. Have tried a number of things and have put debuggers all over the material-ui-chip-input lib code to try to find the cause, but have come up empty so far.

Any ideas?

@leMaik
Copy link
Member

leMaik commented Dec 14, 2016

In your gif, you aren't actually de-focusing the input field (the cursor stays in it). That's why the menu doesn't re-open. I agree that the menu should open on click, though. I'll add that in the next version. 👍

@leMaik leMaik self-assigned this Dec 14, 2016
@leMaik leMaik changed the title openOnFocus works the first time, but not subsequent times Always open auto-complete menu on click Dec 14, 2016
@amit1911
Copy link
Contributor

+1

@marcacyr
Copy link
Author

Ah, okay so @leMaik if I force a de-focus and re-focus on the input then it should work as expected. I can handle that on my end. Thanks for the guidance! Will comment back once I get it working.

@amit1911
Copy link
Contributor

@marcacyr @leMaik i think it's a useful feature to have so it is better if we can implement this in the library itself rather than each of us handling it individually.

@leMaik
Copy link
Member

leMaik commented Dec 16, 2016

I agree with @amit1911; this should be implemented in this lib. 👍

@leMaik leMaik closed this as completed in 577c9af Dec 25, 2016
@marcacyr
Copy link
Author

marcacyr commented Dec 29, 2016

Thank you @leMaik for doing this! When is this going to be released (if there is an ETA)?

@leMaik
Copy link
Member

leMaik commented Dec 30, 2016

@marcacyr Publishing v0.11.4 right now! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants