2017-06-13 65 views
0

我在做一個表單可以上傳描述到我的數據庫作爲最喜歡的選項,問題是我如何使文本輸入從TextInput組件的起始開始?如何將輸入放到textField中?

下面是實現的代碼片段:

<View style={{backgroundColor:'white',height:width.height-175,paddingTop:10, alignItems:'center'}}> 
      <TextInput style={{height: width.height-180, 
           borderColor: 'gray', 
           borderWidth: 1, 
           borderRadius:4, 
           width:width.width-50, 
           paddingLeft:30, 
           paddingRight:30, 
           fontFamily:'NunitoSans-Light',position:'absolute', color:'#596471', fontSize:15}} multiline = {true} label={'descripcionInput'} 
           value={this.state.descripcion} 
           onChangeText={(text) => this.setState({descripcion:text})}> 
      </TextInput> 
</View> 

App's Screenshot

回答

0

的定位很可能爲中心由於View造型的alignItems:'center'財產。嘗試改變這種屬性flex-start

+0

輸入標記仍然是在TextInput componente :(,它不是工作的中心。它只是恢復視圖組件的位置,但對於輸入不工作到文本框零件 –

相關問題