|
|
@ -102,14 +102,22 @@ const MoveFormScreen = ({ navigation, route }: Props) => {
|
|
|
|
<Text style={styles.label}>Power: </Text>
|
|
|
|
<Text style={styles.label}>Power: </Text>
|
|
|
|
<TextInput
|
|
|
|
<TextInput
|
|
|
|
value={move.power.toString()}
|
|
|
|
value={move.power.toString()}
|
|
|
|
onChangeText={(text) => setMove({ ...move, power: Number(text) })}
|
|
|
|
onChangeText={(text) => {
|
|
|
|
|
|
|
|
if (!isNaN(Number(text))) {
|
|
|
|
|
|
|
|
setMove({ ...move, power: Number(text) });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}}
|
|
|
|
style={styles.input}
|
|
|
|
style={styles.input}
|
|
|
|
keyboardType="numeric"
|
|
|
|
keyboardType="numeric"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<Text style={styles.label}>Accuracy: </Text>
|
|
|
|
<Text style={styles.label}>Accuracy: </Text>
|
|
|
|
<TextInput
|
|
|
|
<TextInput
|
|
|
|
value={move.accuracy.toString()}
|
|
|
|
value={move.accuracy.toString()}
|
|
|
|
onChangeText={(text) => setMove({ ...move, accuracy: Number(text) })}
|
|
|
|
onChangeText={(text) => {
|
|
|
|
|
|
|
|
if (!isNaN(Number(text))) {
|
|
|
|
|
|
|
|
setMove({ ...move, accuracy: Number(text) });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}}
|
|
|
|
style={styles.input}
|
|
|
|
style={styles.input}
|
|
|
|
keyboardType="numeric"
|
|
|
|
keyboardType="numeric"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|