Skip to content
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][3.2.4] v-autocomplete with readonly items array breaks v-model type #17361

Closed
jfrs opened this issue May 12, 2023 · 0 comments
Closed
Assignees
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

Comments

@jfrs
Copy link

jfrs commented May 12, 2023

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 its v-model type becomes null | undefined instead of V | 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 the items prop is readonly V[] | undefined.

Actual Behavior

The autocomplete's model accepts null | undefined when the items prop is readonly V[] | undefined.

Reproduction Link

https://play.vuetifyjs.com/#...

Other comments

Follow-up from #17298

@KaelWD KaelWD added T: bug Functionality that does not work as intended/expected T: regression Something that used to work but we broke C: VSelect VSelect typescript and removed S: triage labels May 12, 2023
@KaelWD KaelWD added this to the v3.2.x milestone May 12, 2023
@KaelWD KaelWD self-assigned this May 12, 2023
@KaelWD KaelWD closed this as completed in 24396ea May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants