Input keeps hidden after selecting option with openMenuOnClick=false
See original GitHub issueI set openMenuOnClick=false
.
- Select a option
- Click outside the component
- Click back inside the component
The cursor dos not show up. The options are filtered when typing but the actual input value is not displayed either.
- Repeat 2. and 3.
The cursor is shown. The input value is displayed as well.
I found that the isHidden
property in the Input field remains true
and the Input element is not displayed after selecting the option and clicking out of the component (step 1. to 3.). It is reset to false
after step 4 (see console output in the sandbox example).
Please refer to this Codesandbox.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12
Top Results From Across the Web
Avoid dropdown menu close on click inside - Stack Overflow
First by handling the click on the link to open/close the dropdown like this : ... This event is fired immediately when the...
Read more >Menus - Android Developers
On Android 3.0 and higher, the options menu is considered to always be open when menu items are presented in the app bar....
Read more >Introduction to browser events - The Modern JavaScript Tutorial
An event is a signal that something has happened. All DOM nodes generate such signals (but events are not limited to DOM).
Read more >Popovers - Bootstrap
Documentation and examples for adding Bootstrap popovers, like those found in iOS, to any element on your site. Overview. Things to know when...
Read more ><input type="hidden"> - HTML: HyperText Markup Language
As mentioned above, hidden inputs can be used anywhere that you want to include data the user can't see or edit along with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I agree the opacity isn’t reset this is just a workaround
Fixed my issue (might not be the root cause of yours, but hopefully it saves somebody time)
My selected option text wasn’t showing up after fiddling with the
closeMenuOnSelect
prop as well.I debugged for hours and tried everything on this thread – to no avail. It turns out
inputValue
was fine and I was making a silly mistake by omitting thelabel
field in the object I pass into thevalue
prop.For example my code that hid the selected option value:
and my code that successfully renders the selected option value: