[英]how can i fix this error on React-native project on Appcenter?
[英]How can I fix React-Native Android affineFormats error
我在我的 React-Native 项目中使用react-native-text-input-mask
库。 react-native-text-input-mask
是在 iOS 和 Android 上为 React-Native 添加文本输入掩码的好库之一。 它在 iOS 上运行良好,但在 Android 上,我看到affineFormats
错误。 我该如何解决这个错误?
这是我的代码。
<TextInputMask
style={commonStyles.textInput}
value={phoneNumber}
placeholderTextColor="darkgray"
placeholder="Phone #"
keyboardType="phone-pad"
mask={"+1 ([000])-[000]-[0000]"}
onChangeText={setPhoneNumber}
/>
解决方案是添加缺少的道具。
<TextInputMask
onChangeText={onChangeText}
value={value}
affineFormats={[]}
customNotations={[]}
affinityCalculationStrategy={'WHOLE_STRING'}
mask={"[000].[000].[000]"}
/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.