react-native-picker-select icon indicating copy to clipboard operation
react-native-picker-select copied to clipboard

[Styling][iOS] Bad positionning of the dropdown arrow

Open Sashi-Mee opened this issue 8 years ago • 2 comments

Describe the bug The arrow for indicating the dropdown is appearing below the line of the text.

To Reproduce Steps to reproduce the behavior:

  1. Implement a React-native-picker-select
  2. Have minimal / no style, or copy the one from the example.
  3. Run on iOS simulator (iPhone6, iOS 11.4)
  4. See error

Expected behavior The arrow should be inline with the text.

Screenshots Here's what it looks like :

Smartphone (please complete the following information):

  • Device: iPhone6
  • OS: iOS 11.4
  • react-native-picker-select version: 4.4.0
  • react-native version: 0.55.1
  • react version: 16.3.1

Reproduction and/or code sample ` state = { objetRdv: null, destinataireRdv: null, campusRdv:null, modaliteRdv:null, urgenceRdv:null, fetching:false, success:false, textBoutton:"Suggerer" }

async sendRendezVous(text,cat) { this.setState({fetching:true, textBoutton:"En cours..."}) let response = {ok:false} try { response = await FixtureAPI.sendRendezVous(text,cat); } catch (e) { console.log("Erreur") this.setState({success:false,textBoutton:"Réessayer"}) } if (response.ok) { this.setState({success:true,fetching:false,textBoutton:"Bien reçu !"}) } else { this.setState({success:false,fetching:false,textBoutton:"Réessayer"}) }

} render () { return ( Demande de Rendez-Vous

      <RNPickerSelect
        placeholder={{
          label:"Chosissez un destinataire",
          value:null
        }}
        items={[
          {label:"Conseiller Pédagogique", value:"1"},
          {label:"Documentaliste", value:"2"},
          {label:"Direction", value:"3"},
          {label:"Autre", value:"4"}
        ]
        }
        onValueChange={(itemValue, itemIndex) => this.setState({objetRdv: itemValue})}
        value={this.state.objetRdv}
        style={styles.RNPickerSelect}
      />
      {/* <Picker
        selectedValue={this.state.categorieSuggestion}
        onValueChange={(itemValue, itemIndex) => this.setState({categorieSuggestion: itemValue})}>
        <Picker.Item label="Général" value="1"/>
        <Picker.Item label="Organisationnel" value="2"/>
        <Picker.Item label="Application" value="3"/>
        <Picker.Item label="Coiffure" value="4"/>
        <Picker.Item label="Style" value="5"/>
        <Picker.Item label="Autre" value="6"/>
      </Picker> */}
      <View
        style={styles.multilineText}>
        <TextInput
          multiline={true}
          maxLength={40}
          onChangeText={(textSuggestion) => this.setState({textSuggestion})}
          placeholder="Quel est l'objet de votre demande ? (2000 caractères max.)"
        />
      </View>
      <View style={styles.RNPScontainer}>
        <RNPickerSelect
        placeholder={{
          label:"Sur quel campus ?",
          value:null
        }}
        items={[
          {label:"Nantes", value:"1"},
          {label:"Rennes", value:"2"},
          {label:"Brest", value:"3"},
          {label:"Toulouse", value:"4"}
        ]}
        onValueChange={(itemValue, itemIndex) => this.setState({campusRdv: itemValue})}
        value={this.state.campusRdv}
        style={styles.inputIOS}
        />
      </View>
      <RNPickerSelect
        placeholder={{
          label:"Quel degré d'urgence de ce RDV ?",
          value:null
        }}
        items={[
          {label:"Dans la semaine", value:"1"},
          {label:"Dans le mois", value:"2"},
          {label:"Dans le trimestre", value:"3"}
        ]
        }
        onValueChange={(itemValue, itemIndex) => this.setState({campusRdv: itemValue})}
        value={this.state.campusRdv}
        style={styles.inputIOS}
      />

      <Text>
      Text : {this.state.textSuggestion}
      </Text>
      <Text>
        Catégorie : {this.state.categorieSuggestion}
      </Text>
      <Text>
      Boutton : {this.state.textBoutton}
      </Text>
      <Text>
        Fetching : {this.state.fetching.toString()}
      </Text>
      <Text>
      success : {this.state.success.toString()}
      </Text>
      <Text
        style={this.state.fetching ? {opacity:1} : {opacity:0}}>
        "Fetching"
      </Text>
      <SemanticButton
        text={this.state.textBoutton}
        onPress={()=>{
          this.sendRendezVous(this.state.textSuggestion,this.state.categorieSuggestion)
          }
        }
        type="info"
      />
    </KeyboardAvoidingView>
  </ScrollView>
)

} `

Syles :

`import { StyleSheet } from 'react-native' import { ApplicationStyles } from '../../Themes/'

export default StyleSheet.create({ ...ApplicationStyles.screen, multilineText:{ backgroundColor: '#FFFFFF', borderBottomColor: '#000000', borderBottomWidth: 1, padding:10, margin:10, borderRadius:10, minHeight:120 }, RNPickerSelect:{ paddingTop:10, margin:10, borderColor:'#000000', borderWidth: 1, borderRadius:20 }, inputIOS: { fontSize: 16, paddingTop: 13, paddingHorizontal: 10, paddingBottom: 12, borderWidth: 1, borderColor: 'gray', borderRadius: 4, backgroundColor: 'white', color: 'black', }, RNPScontainer: { paddingTop: 30, backgroundColor: '#fff', justifyContent: 'center', paddingHorizontal: 10, } }) `

Sashi-Mee avatar Oct 04 '18 12:10 Sashi-Mee

Can you reproduce the issue on snack.expo? Or share the contents of your ApplicationStyles?

I was unable to reproduce the issue based on what you shared

https://snack.expo.io/S1zCcX_cX

lfkwtz avatar Oct 08 '18 00:10 lfkwtz

Closing due to inactivity

lfkwtz avatar Oct 21 '18 21:10 lfkwtz