Closed yangwenhaowenhe closed 7 years ago
Explain the issue you met, and describe what you expected to be. If you can write in English, we will be very grateful.
my code
handleChange = (value)=>{ this.setState({ searchValue: value }) }
<AutoComplete onSelect={(item) => this.setState({ searchValue: item.name })} customItem={CustomSuggestion} placeholder="请输入搜索关键词" value={searchValue} onChange={this.handleChange} autofocus fetchSuggestions={debounce(this.getSearchSuggestion,500).bind(this)}>
It's better to post up the error stack for us to trace this issue.
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
Any additional information, configuration or data that might be necessary to reproduce the issue.
Yep, there's no onChange event for AutoComplete, using onSelect instead of onChange.
onChange
AutoComplete
onSelect
Description
Explain the issue you met, and describe what you expected to be. If you can write in English, we will be very grateful.
Reproduce Steps
my code
handleChange = (value)=>{ this.setState({ searchValue: value }) }
<AutoComplete onSelect={(item) => this.setState({ searchValue: item.name })} customItem={CustomSuggestion} placeholder="请输入搜索关键词" value={searchValue} onChange={this.handleChange} autofocus fetchSuggestions={debounce(this.getSearchSuggestion,500).bind(this)}>
Error Trace (if possible)
It's better to post up the error stack for us to trace this issue.
Solution
What needs to be done to address this issue? Ideally, provide a pull request with a fix.
Additional Information
Any additional information, configuration or data that might be necessary to reproduce the issue.