-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Simple Autocomplete updates model with both user input and selection #630
Comments
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 7, 2018
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 7, 2018
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 7, 2018
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 8, 2018
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 8, 2018
Mobe91
added a commit
to ordami/primereact
that referenced
this issue
Nov 9, 2018
We'll reconsider if there is more demand, thank you. Currently the behavior is same across all Prime UI libraries. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There is no guarantee in receiving an immediate response in GitHub Issue Tracker, If you'd like to secure our response, you may consider PrimeReact PRO Support where support is provided within 4 business hours
I'm submitting a ... (check one with "x")
Current behavior
Currently, the model update behavior of multi autocomplete and simple autocomplete differs. While the multi autocomplete only updates the model with the user's selection, the simple autocomplete updates the model with both the user's input and its selection. It seems the reason for this is to be able to update the autocomplete's input value programmatically (#576).
As a result, a simple autocomplete backed by an array of complex objects sometimes updates the model (i.e. the
value
prop) with both input strings typed by the user and object values selected by the user. This is not the case in multi mode.Expected behavior
I think it would be better to introduce a second prop
selection
that captures the user selection and to use the existingvalue
prop for binding the string content of the autocomplete input.React version:
16.5.2
PrimeReact version:
2.0.0-beta.9
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
all
Language: [all | TypeScript X.X | ES6/7 | ES5]
all
The text was updated successfully, but these errors were encountered: