React Native Nativebase如何让Picker向右浮动
React Native Nativebase how to float Picker to the right
我有向下箭头按钮,我想在右侧浮动。
<Form>
<Item inlineLabel>
<Label>Name *</Label>
<Input
autoFocus
type="text"
onChangeText={text => this.setState({ name: text })}
value={this._replaceSpace(this.state.name)}
placeholderTextColor="#BFC6EA"
placeholder='Grilled Chicken'
style={{ textAlign: 'right', marginRight: 10 }}
/>
</Item>
<Item inlineLabel>
<Label>Serving Per Container *</Label>
<Picker
mode="dropdown"
iosHeader="Select your SIM"
iosIcon={<Icon name="arrow-down" style={{}} />}
style={{ width: undefined }}
selectedValue={this.state.selected}
onValueChange={this.onValueChange.bind(this)}
>
<Picker.Item label="Wallet" value="key0" />
<Picker.Item label="ATM Card" value="key1" />
<Picker.Item label="Debit Card" value="key2" />
<Picker.Item label="Credit Card" value="key3" />
<Picker.Item label="Net Banking" value="key4" />
</Picker>
</Item>
</Form>
如果有人遇到这个问题。 flex: 1
到标签组件。
我有向下箭头按钮,我想在右侧浮动。
<Form>
<Item inlineLabel>
<Label>Name *</Label>
<Input
autoFocus
type="text"
onChangeText={text => this.setState({ name: text })}
value={this._replaceSpace(this.state.name)}
placeholderTextColor="#BFC6EA"
placeholder='Grilled Chicken'
style={{ textAlign: 'right', marginRight: 10 }}
/>
</Item>
<Item inlineLabel>
<Label>Serving Per Container *</Label>
<Picker
mode="dropdown"
iosHeader="Select your SIM"
iosIcon={<Icon name="arrow-down" style={{}} />}
style={{ width: undefined }}
selectedValue={this.state.selected}
onValueChange={this.onValueChange.bind(this)}
>
<Picker.Item label="Wallet" value="key0" />
<Picker.Item label="ATM Card" value="key1" />
<Picker.Item label="Debit Card" value="key2" />
<Picker.Item label="Credit Card" value="key3" />
<Picker.Item label="Net Banking" value="key4" />
</Picker>
</Item>
</Form>
如果有人遇到这个问题。 flex: 1
到标签组件。