简体   繁体   English

React Native获取TextInput值并使用onBlur或onFocus方法在同一View上使用

[英]React Native get TextInput value and use on the same View using onBlur or onFocus method

I would like to get the value from a TextInput picker (using react-native-material-dropdown) and perform calculations on close of dropdown using the blur method, the dropdown is numeric. 我想从TextInput选择器中获取值(使用react-native-material-dropdown),并使用blur方法在下拉列表关闭时执行计算,下拉列表是数字。

<Dropdown
        label='meals'
        data={data}
        onChangeText={this.onRegularMealChange.bind(this)}
        value={this.props.regularMeal}
      />

would like to do something like: 想做类似的事情:

<View>
          <Text>{amount * this.props.regularMeal}</Text>
        </View>
      </View>

我的减速器有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM