React-native-web: Appearance is not allowed for <Picker />

Created on 25 Jul 2018  路  2Comments  路  Source: necolas/react-native-web

The problem
<Picker /> doesn't add padding in chrome and webkit browsers. To fix it is just matter of adding appearance: none but then it shows a warning in console.

How to reproduce

Live example
Simplified test case:

<Picker selectedValue="mango" style={{ padding: 24, appearance: "none" }}>
  <Picker.Item label="Kiwi" value="kiwi" />
  <Picker.Item label="Apple" value="apple" />
  <Picker.Item label="Mango" value="mango" />
  <Picker.Item label="Watermelon" value="watermelon" />
</Picker>

Steps to reproduce:

  1. Access codesandbox with chrome.

Expected behavior
the rendered <select> should have padding, or in any case, allow for the appearance property at least in web using Platform.OS

Environment (include versions). Did this work in previous versions?

  • React Native for Web (version): 0.8.9
  • React (version): 16.4.1
  • Browser: Chrome

Most helpful comment

On the web, the elements are usually customized, not the UI by default and is what I need to correctly visualize the web part of the project in which I work should be able to do without launching warnings that you are using an incorrect style prop I believe @necolas

All 2 comments

Doing that removes the default browser UI, so it's not recommended or supported

On the web, the elements are usually customized, not the UI by default and is what I need to correctly visualize the web part of the project in which I work should be able to do without launching warnings that you are using an incorrect style prop I believe @necolas

Was this page helpful?
0 / 5 - 0 ratings

Related issues

zhangking picture zhangking  路  3Comments

MovingGifts picture MovingGifts  路  3Comments

holmesal picture holmesal  路  3Comments

EvanBacon picture EvanBacon  路  3Comments

shirakaba picture shirakaba  路  3Comments