Skip to content

bug: IonSelect is not showing the options when clicked (React) #21341

@GRardB

Description

@GRardB

Bug 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:

  1. Right click on the <IonSelect> in the browser.
  2. Inspect element
  3. A <button> gets highlighted in the devtools. I delete this
  4. I click the <IonSelect> in the browser again
  5. 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:
example

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions