bug: IonSelect is not showing the options when clicked (React)
See original GitHub issueBug Report
Ionic version:
@ionic/react 5.1.1,
Current behavior:
When clicking on the <IonSelect>
element, the options do not get displayed.
Expected behavior:
When clicking on the <IonSelect>
element, the options are displayed.
Steps to reproduce: / Related code: I’ve tried copy-pasted the code directly from the documentation and still run into this issue.
<IonList>
<IonItem>
<IonLabel>Hemisphere</IonLabel>
<IonSelect
value={hemisphere}
interface="popover"
onIonChange={(e) => {
SettingsStorage.setHemisphere(e.detail.value!)
setHemisphere(e.detail.value!)
}}
>
<IonSelectOption value="N">Northern</IonSelectOption>
<IonSelectOption value="S">Southern</IonSelectOption>
</IonSelect>
</IonItem>
</IonList>
Other information: It appears that when I do the following, I am able to get the options to display:
- Right click on the
<IonSelect>
in the browser. - Inspect element
- A
<button>
gets highlighted in the devtools. I delete this - I click the
<IonSelect>
in the browser again - Options displayed!
Ionic info:
Ionic:
Ionic CLI : 6.9.1 (/Users/grardb/.config/yarn/global/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 5.1.1
Capacitor:
Capacitor CLI : 2.1.0
@capacitor/core : 2.1.0
Utility:
cordova-res : not installed
native-run : not installed
System:
NodeJS : v11.14.0 (/Users/grardb/.nvm/versions/node/v11.14.0/bin/node)
npm : 6.7.0
OS : macOS High Sierra
A gif of what’s happening:
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
bug: IonSelect is not showing the options when clicked (React ...
Bug Report Ionic version: @ionic/react 5.1.1, Current behavior: When clicking on the element, the options do not get displayed.
Read more >React IonSelect not rendering pre selected value from state
The IonSelect doesn't show the pre selected text value when screen loads. If I click the IonSelect then the selected value shows.
Read more >ion-searchbar - Ionic Framework
A clear button is displayed when a searchbar has a value or upon entering input in the searchbar's text field. Clicking on the...
Read more >React and Ionic Select Setting values Example - Mobiscroll
Use the buttons option for showing/hiding set , cancel or add custom buttons. Controlling the default value. The select has no selected value...
Read more >Forms And Validation In Ionic React - Smashing Magazine
Thankfully, it isn't all doom and gloom. I recently came across React Hook Form (RHF), a library for working with forms in React...
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 FreeTop 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
Top GitHub Comments
Hey there, I filed a bug with the Firefox team: https://bugzilla.mozilla.org/show_bug.cgi?id=1640189. Looks like this has been fixed in Firefox 78, so a fix should be available whenever that ships.
Ah you know what this is actually a duplicate of an older bug: https://github.com/ionic-team/ionic/issues/20179. This ended up being a bug in Firefox with Touch Simulation, and not a bug in Ionic Framework.
The workaround for now is to not use Touch Simulation when developing in Firefox. We will report this to the Firefox dev team. Thanks!