question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[RN 0.59.1] Android picker is always shown as dropdown

See original GitHub issue

🐛 Bug Report

The picker on Android is always shown as a dropdown, even if the mode is set to dialog. On RN 0.58.6 it works according to the mode that is set (“dialog” or “dropdown”).

RN 0.59.1 Screenshot_20190319-164006_testPicker

RN 0.58.6 Screenshot_20190320-073759_testPickerVersion58

To Reproduce

Initialize a new react native project: react-native init testPicker

Add the code example for the picker attached below to the return, as well in the constructor this.state = {language: “Java”};

Run the project: react-native run-android

Expected Behavior

I expect that when the picker mode is set to “dialog” (or not set, because the default mode is “dialog”) to open the items in a new modal window, not as dropdown anchored to the picker view

Code Example

render() { return ( <View style={styles.container}> <Text style={styles.welcome}>Welcome to React Native!</Text> <Text style={styles.instructions}>To get started, edit App.js</Text> <Text style={styles.instructions}>{instructions}</Text> <Picker selectedValue={this.state.language} style={{height: 50, width: 100}} mode={"dialog"} onValueChange={(itemValue, itemIndex) => this.setState({language: itemValue}) }> <Picker.Item label="Java" value="java" /> <Picker.Item label="JavaScript" value="js" /> </Picker> </View> ); }

Environment

react-native --version react-native-cli: 2.0.1 react-native: 0.59.1

react-native info info React Native Environment Info: System: OS: Windows 10 CPU: (8) x64 Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 23.85 GB / 31.88 GB Binaries: Yarn: 1.5.1 - C:\Program Files (x86)\Yarn\bin\yarn.CMD npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:40
  • Comments:45 (7 by maintainers)

github_iconTop GitHub Comments

22reactions
janbuerlingcommented, May 10, 2019

What is the current status of this bug?

16reactions
wuifdesigncommented, Jun 7, 2019

any new updates/workarounds on this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mode property of ReactNative's Picker component does not ...
The picker on Android is always shown as a dropdown, even if the mode is set to dialog. On RN 0.58.6 ,it was...
Read more >
React native dropdown picker v4 - npm
A single / multiple, categorizable & searchable item picker (dropdown) component for react native which supports both Android & iOS.
Read more >
Top 8 React Native Dropdown Libraries You Should Know ...
Picker select cascader dropdown developed in react native for Android and IOS ... Dynamic dropdown size and position; Configurable visible item count ...
Read more >
Android Spinner - drop down list | DigitalOcean
Below image shows the android studio project for spinner example. ... Let's start with the layout of the MainActivity class. We just need...
Read more >
Dropdown picker to always open below toggle : r/reactnative
Hey there! I am using react-native-dropdown-picker but sometimes it appears above the toggle. Can it be forced to always open downwards? Thanks!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found