-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
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
AutocompleteInput no property inputValueMatcher #2864
Comments
Sorry we actually removed this prop but did not update the documentation accordingly. Will do! |
what do you think about:
|
You're describing solutions, not the actual issues you're having. Can you explain why you need that? |
Real life example: address entry form.
Since when choosing a regionId or districtIdOrCityId, nothing except id is available to me, I have to use a crutch.
I wrap the ReferenceInput component with a custom component, since inside ReferenceInput there are choices property, and save it to the global array, so that later onChange action can be done by regionsArr.find () to find the record I just selected and take its name.
Why do I do all this if I just need onSuggestionSelected = suggestion => ()?
To determine the correct addresses, the api of the federal address system is used. There are ALL addresses. For a suggestionComponent render with shouldRenderSuggestions = {(val) => {return val.trim (). Length> 2} everything works fine, but ... |
What is about: #2836 (comment) ? |
@wmwart I don't understand your last comment, please rephrase and be more specific. As for your own use case, if |
#2836. The problem is not solved. I am not hesitate. I believe that the proposed improvements fit your concept of a convenient and fast user interface. |
|
Fixed as we updated the documentation in V3 |
What you were expecting:
Expected that inputValueMatcher would work as in documentation.
What happened instead:
Does not work. There is no inputValueMatcher property in the AutocompleteInput.js code
Steps to reproduce:
Add inputValueMatcher = {(input, suggestion, getOptionText) => {}} to AutocompleteInput. Does not work.
Other information:
Please add the custom property onSuggestionSelected = suggestion => {}, which callback to this.onSuggestionSelected AutocompleteInput component.
If there is already a way to get selected suggestion, please share it.
Is it possible, when using the shouldRenderSuggestions property, to make requests to the server, only when shouldRenderSuggestions => true? This would help optimize not only the render suggestions, but also the responses from the server. What do you think?
Environment
The text was updated successfully, but these errors were encountered: