React-native-picker-select: Can we remove placeholder text from modal?

Created on 23 Jan 2019  Â·  11Comments  Â·  Source: lawnstarter/react-native-picker-select

Can we remove placeholder text from modal?

Most helpful comment

placeholder={{}}

All 11 comments

placeholder={{}}

If you want to remove the placeholder from JUST the modal - you could possibly dynamically update the value onOpen for iOS.

Also see #98

‘placeholder={{}}’

It doesn't works... both iOS and Android saying:

TypeError: undefined is not an object (evaluating 'this.state.selectedItem.label')
This error is located at:
in RNPickerSelect (etc...)

works fine on the sample app https://snack.expo.io/@lfkwtz/react-native-picker-select

feel free to open a full bug report if you see otherwise

From sample app, is there way to show text on text input field but not on modal? Sorry for making this so confusing.

@maharjanaman

If you want to remove the placeholder from JUST the modal - you could possibly dynamically update the value onOpen for iOS.

Also see #98

@lfkwtz I face the same error as @kaantyy.

default

See https://snack.expo.io/@illuminator/react-native-picker-select-|-placeholder-problem

@gluons you're initializing with an empty items array. This is not currently supported.

Feel free to open a feature request ticket (and submit a PR if you want to).

@lfkwtz OK. I create #161.

If you want to remove the placeholder from JUST the modal - you could possibly dynamically update the value onOpen for iOS.

Also see #98

what about android?

@BogdanTaranenko - added support for onOpen in 6.4.0 on android

notes:

  • will not work when useNativeAndroidPickerStyle={true}
  • no easy way to detect picker close on android, so callback currently isn't supported
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dakairus picture dakairus  Â·  3Comments

marcoizzo picture marcoizzo  Â·  4Comments

ltsharma picture ltsharma  Â·  3Comments

dquessenberry picture dquessenberry  Â·  7Comments

Hristijan95 picture Hristijan95  Â·  4Comments