ВЛ
Куда их вставлять?
Size: a a a
ВЛ
MD
MD
MD
ВЛ
MD
MD
DV
AP
ЮЗ
V
VO
class NumberInput extends Component {
constructor(props) {
super(props)
bind(this)
this.state = { text: "" }
}
onChange(text) {
if (!text.match(/[^\d\.-]/) && text.match(/^-?\d*\.?\d*$/)) {
this.setState({text})
}
}
render() {
return (
<TextInput
placeholder="0"
keyboardType="numeric"
onChangeText={this.onChange}
value={this.state.text}
/>
)
}
}
VO
class NumberInput extends Component {
constructor(props) {
super(props)
bind(this)
this.state = { text: "" }
}
onChange(text) {
if (!text.match(/[^\d\.-]/) && text.match(/^-?\d*\.?\d*$/)) {
this.setState({text})
}
}
render() {
return (
<TextInput
placeholder="0"
keyboardType="numeric"
onChangeText={this.onChange}
value={this.state.text}
/>
)
}
}
S