React-native-picker-select: Android always dropdown mode

Created on 20 Mar 2019  路  9Comments  路  Source: lawnstarter/react-native-picker-select

Hello, I'm encountering weird issue. In your examples there is always "modal" mode of picker ( when I run examples from expo on my Xiaomi mi 8, I'm getting modal mode), but when I copy/paste examples into my app, on android I always get "dropdown" mode picker. Even if I set prop {pickerProps: {mode: "modal"}} it is not doing anything and I'm always getting dropdown type of picker.

Is this normal behaviour?

Enclosing my code:

<RNPickerSelect
        placeholder={placeholderObject}
        items={itemsList}
        onValueChange={this.onValueChange}
        onClose={this.onDonePress}
        style={styles.pickerClassic}
        useNativeAndroidPickerStyle={false} // there is no difference when i set this to true
        value={this.state.currentValue}
        Icon={icon}
        pickerProps={{ mode: "dialog" }}
      />

Most helpful comment

My problem is related to this issue https://github.com/facebook/react-native/issues/24055

All 9 comments

there is no mode: "modal" - it's either dialog or dropdown --- can you clarify which isn't working as expected?

I meant mode: "dialog",, sorry for that.. I would expect to get modal window, not dropdown menu when i open the picker. Even when I'm running example from expo, when I open the picker, modal is shown. But in my app, it always open picker items in dropdown instead of modal.

Not sure. Can you update your original message to use the bug template?

And include a link to a github repo where this problem can easily be reproduced on an android device

Yep i will update it tomorow :) thanks for following up!

Also - have you verified the issue occurs only on this package and not also on the native RN Picker?

My problem is related to this issue https://github.com/facebook/react-native/issues/24055

Good find on the upstream issue. This is precisely why we always stay one major version behind.

Any updates? it still opens as dropdpwn on RN v0.61.5 on an android device

Was this page helpful?
0 / 5 - 0 ratings