react-native - 评估 _react-native 动画 Text.PropsTypes.style
问题描述
我是 React Native 的新手,我正在尝试使用 React Native Material 下拉菜单,但我面临一个问题
评估 _react-native 动画 Text.PropsTypes.style
import { Dropdown } from 'react-native-material-dropdown'
var rbdagegroup = [
{ label: 'Adult', value: 'A' },
{ label: 'Junior', value: 'J' }
];
export default class PersonalInfo extends React.Component {
constructor(props) {
super(props)
}
state = {
AgeGroup: '',
}
render() {
return (
<View style={{ flex: 1, marginTop: '10%' }}>
<TextInput
placeholder="plac "
/>
<Dropdown
value={this.state.AgeGroup}
data={rbdagegroup}
placeholder='Please select USTA Rating'
pickerStyle={{ borderBottomColor: 'transparent', borderWidth: 0 }}
dropdownOffset={{ 'top': 0 }}
containerStyle={{ width: '100%', marginRight: '10%' }}
inputContainerStyle={{ borderBottomWidth: 0 , paddingTop:"1%"}}
onChangeText={(AgeGroup) => {
this._SetAgeGroup({
AgeGroup
})
}}
/>
</View>
);
}
}
我该如何解决这个问题?
解决方案
您可以通过在 ..\node_modules\react-native-material-dropdown\src\components\dropdown 文件中注释 itemTextStyle: Text.propTypes.style 来解决此问题。
并在 react-native-material-textfield 的 affix/index helper/index label/index 中删除 Animated.Text.propTypes.style 中的 Animated 并添加 import { Animated, Text} from 'react-native'; 在上述三个文件中的每一个中。
推荐阅读
- javascript - 如何使用解构来获取参数的目标属性
- python - 无法导入模块“lambda_function”:没有名为“cx_Oracle”的模块
- swift - 为什么在 Data.base64EncodedString 中使用 endLineWithLineFeed 不会在编码字符串的末尾添加新行?
- xpath - 在与 Xpath 保持关系的同时提取信息
- python - model.set_weights(model.get_weights()) 返回错误
- c# - 为什么使等待同步不能在单独的方法中工作?
- amazon-dynamodb - 使用硬编码散列键但使用不同范围键输入的行
- graph - 计算从给定顶点到具有定义属性的顶点的最短距离
- java - Seleniumchrome 驱动程序无法打开
- php - 在 rest API (php) 中调用 LINK