[Bug Report][3.2.4] v-autocomplete with readonly items array breaks v-model type #17361
Labels
C: VSelect
VSelect
T: bug
Functionality that does not work as intended/expected
T: regression
Something that used to work but we broke
typescript
Milestone
Environment
Vuetify Version: 3.2.4
Vue Version: 3.3.1
Browsers: Firefox 112.0
OS: Windows 10
Steps to reproduce
When you pass a
readonly
array to the autocomplete's items itsv-model
type becomesnull | undefined
instead ofV | null | undefined
.Removing the
readonly
modifier solves the issue but TypeScript will complain when passing the prop.Expected Behavior
The autocomplete's model accepts
V | null | undefined
when theitems
prop isreadonly V[] | undefined
.Actual Behavior
The autocomplete's model accepts
null | undefined
when theitems
prop isreadonly V[] | undefined
.Reproduction Link
https://play.vuetifyjs.com/#...
Other comments
Follow-up from #17298
The text was updated successfully, but these errors were encountered: