React Native have to double click for onPress to work

前端 未结 2 1612
隐瞒了意图╮
隐瞒了意图╮ 2020-12-17 09:07

I\'m using React Native with the Native Base library. I need an onPress event to fire on Native Base\' ListItem (equivalent to TouchableOpacity) when the keyboard is open. <

2条回答
  •  渐次进展
    2020-12-17 09:40

    I actually just figured this out. I added the keyboardShouldPersistTaps='always' prop to my List, in addition to the Content tag:

    
      
        
           { this.titleSearch = input }}
            placeholder='Start typing...'
            multiline={true}
            onChangeText={this.setSearchText.bind(this)}
            value={this.getSearchValue()}/>
        
        
          Recommended Descriptions
          
             this.setInformationDescription(description)}>
              {description}
            
          
        
      
    
    

提交回复
热议问题