vuetify
vuetify copied to clipboard
fix(VAutocomplete): fix unable to set default searchInput
resolves #9757
Description
When using a default value in search-input it was reset because VSelect wasn't aware that it was selected. Now when a default value is used, it will be selected when VAutocomplete is created.
Motivation and Context
This change fixes issue #9757.
How Has This Been Tested?
I've tested this manually.
Markup:
<template>
<v-container>
<v-autocomplete
:search-input.sync="search"
:items="items"
/>
</v-container>
</template>
<script>
export default {
data: () => ({
search: 'three',
items: [
'one',
'two',
'three'
],
}),
}
</script>
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Improvement/refactoring (non-breaking change that doesn't add any features but makes things better)
Checklist:
- [x] The PR title is no longer than 64 characters.
- [x] The PR is submitted to the correct branch (
master
for bug fixes and documentation updates,dev
for new features and backwards compatible changes andnext
for non-backwards compatible changes). - [x] My code follows the code style of this project.
- [ ] I've added relevant changes to the documentation (applies to new features and breaking changes in core library)