-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
when i click on send messege button then it's working on double press on button .first button hide the keyboard and second send the text from text field. how i can send it on single click. this is my source code.
<ScrollView style={{backgroundColor: '#F4F4F4'}} onScroll={this.scroll}>
{data}
<View style={{backgroundColor:"#F4F4F4",flexDirection: 'row',paddingLeft:5,paddingBottom:5,height:SCREEN_HEIGHT*7/100}}>
<TextInput
multiline={true}
defaultValue={this.state.post}
returnKeyType='done'
maxLength={500}
onChangeText={(post) => {this.setState({post});}}
style={{backgroundColor: '#ffffff',
marginTop: 5,
paddingLeft: 15,
paddingRight: 15,
marginLeft:screen.width/100*3,
width:screen.width/100*78,
fontSize:screen.width/100*4,
color:'gray'}}
placeholderTextColor="gray"
onSubmitEditing={(event) => this.postComment()}
placeholder='Write a comment'/>
<TouchableOpacity onPress={()=>{this.postComment()}}>
<Thumbnail square style={{marginLeft:8,marginTop:8,width:screen.width/100*7,height:screen.height/100*4}} source={send}/>
</TouchableOpacity>
</View>
<KeyboardSpacer/>
Metadata
Metadata
Assignees
Labels
No labels