-
-
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
[Bug Report] [v-autocomplete] Wrong menu position on items change if it is already open #10375
Comments
That has nothing to do with |
Then I'll need some additional information. |
calling |
That won't for v-select though, it has the same problem |
I managed to solve this problem in the following way: watch: {
async search(val) {
this.items = []; // important 🤓
this.items = await this.fetchDataFromApi();
},
}, |
Doesn't seem to work in my case. I already had a clear on my items but doesn't seem to fix it. |
My workaround: <v-autocomplete ref="autocomplete" :items="items"> computed: {
items() { ... },
},
watch: {
items: {
deep: true,
handler() {
this.$nextTick(() => {
this.$refs.autocomplete.updateMenuDimensions();
});
},
},
}, |
This Issue is being closed due to inactivity. If you have any questions, please reach out to us in our Discord community. |
I don't know if this will work for you, but adding the attach prop to v-autocomplete solved it for me.
|
Environment
Vuetify Version: 2.2.8
Vue Version: 2.6.11
Browsers: Chrome 79.0.3945.117
OS: Mac OS 10.15.2
Steps to reproduce
While the autocomplete menu is open and items of the autocomplete change (in the example from empty array to a 5 elements array), the menu doesn't change position until I close and re-open it.
Expected Behavior
I expect that after the item list of the autocomplete change, it will adjust the dropdown menu position, also if it already open
Actual Behavior
Position of dropdown position doesn't change until the dropdown menu is not reopened
Reproduction Link
https://codepen.io/alessandro-mesti-sinerbit/pen/ZEYNyjW?editors=1010
The text was updated successfully, but these errors were encountered: