-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
fix(VAutocomplete): update search value for mobile #15025
fix(VAutocomplete): update search value for mobile #15025
Conversation
Switch from using v-model to :value/@input for data binding between VAutocomplete and inner VTextField
Weird vuejs/vue#9777 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This probably applies to combobox too
@KaelWD would you like the PR to include a fix for combobox to before you approve this PR? |
Yes please |
Switch from using v-model to :value/@input for data binding between VCombobox and inner VTextField
@KaelWD: Here you are, now it is updated in VCombobox as well :-) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty
I think this breaks the keyboard that's using IME composition model, e.g. Chinese keyboard Screen.Recording.2023-10-23.at.3.49.38.pm.movcomposition session events should be left to system keyboard to handle. Also, I tried Gboard, maybe I missed something, but latest version Gboard doesn't have that underline composition suggestions anymore. If this was true, this PR should be rolled back and consistently use |
Motivation and Context
VAutocomplete only filters complete waits for words to be completed on Android. The input of the inner VTextField of VAutocomplete is binded with a v-model. When using an android phone with autocomplete keyboard (GBoard) the value is first emitted when a word is completed. For instance if you write "House" v-model will first be updated when the word is completed and not on "H" -> "Ho" -> "Hou"... This means that VAutoComplete only filters on completed words.
Here is a codepen
Description
This pull request changes the databinding of VTextField in VAutoComplete from v-model into
@input
and:modelValue
.@input
is emitted on every key, while v-model waits for a word to be completed when using autocomplete on android keyboards.How Has This Been Tested?
The code has been tested visually.
Markup:
Types of changes
Checklist:
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes).