I introduced a Texinput for Search in react-native. Here are the codes:
constructor(props){
super(props);
this.state = {
value : "",
items: [],
}
this.handleHeaderSearch = this.handleHeaderSearch.bind(this);
this.handleSearchBtn = this.handleSearchBtn.bind(this);
}
handleSearchBtn(){
}
handleHeaderSearch(){
if(!this.state.value) return;
}
and:
<TextInput
value={this.props.value}
onChange = {this.props.onChange}
placeholder={"جستجو"}
blurOnSubmit={false}
style={{flex:0.9}}
returnKeyType="done"
/>
Whenever I run Android after typing in the text input, I see this warning:
"Warning Failed prop type invalid prop 'value' of type 'object' supplied to TextInput, expected 'string'"