We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have this function which
_handleSort = (a, b, input_string) => { let distance = this.levenshtein.get(a.name, input_string) - this.levenshtein.get(b.name, input_string) console.log(`a:${a.name}, b:${b.name}, input:${input_string}`) return distance; }
How can I make it so that the results are sorted by this function as I type in the AsyncTypeAhead
The text was updated successfully, but these errors were encountered:
something like this?
<AsyncTypeahead onSearch={this._handleSearch} searchOptions={this._handleSort} ... _handleSort = (value, options) => { let sorter = (a, b) => { let distance = this.levenshtein.get(a.name, value) - this.levenshtein.get(b.name, value) console.log(`a:${a.name}, b:${b.name}, input:${value}`) return distance; } return options.sort(sorter) }
it doesn't seem like the sorter function is ever getting called
Sorry, something went wrong.
No branches or pull requests
I have this function which
How can I make it so that the results are sorted by this function as I type in the AsyncTypeAhead
The text was updated successfully, but these errors were encountered: