vuetify
vuetify copied to clipboard
[Bug Report][3.3.7] Why is :multiple="true" not allowed on v-select?
Environment
Vuetify Version: 3.3.7 Vue Version: 3.3.2 Browsers: Chrome 114.0.0.0 OS: Windows 10
Steps to reproduce
It's not allowed to set :multiple="true", because the type definition only allow false|undefined. It's working anyway, but I always get a warning:
Type true is not assignable to type false | undefined
Expected Behavior
No warning.
Actual Behavior
Functional, but get warning.
Reproduction Link
(does not show the type error there) https://play.vuetifyjs.com/#...
I believe there may be some confusion regarding the usage of the "multiple" prop and the redundancy of binding the value of "multiple" to true. It is worth noting that in VueJS components, the implicit true value is sufficient, rendering the explicit binding unnecessary.
<v-select :multiple="true" />
<v-select multiple />
Would you kindly share the warning console error message, please?
I actually can't, because i'm on holiday now. ;)
But some thoughts:
-
How would you define multiple dynamically then?
-
Why does
:flat="true"on Buttons for example works fine? -
I work on a project where a linting rule doesn't allow empty HTML attributes/properties. So in plain HTML it would be
multiple="multiple"ormultiple="1", what both is not allowed too.
#17211
#17211
Oh yes, it seems like the same behavior. But without using volar. 😉
How are you getting typescript warnings in vue templates without volar
Using webStorm/phpStorm you get volar like errors within the IDE too.
Doesn't current webstorm use Volar as well? It's 1.6.5 though, not sure if you can update it or just have to wait for next webstorm
I'm using phpStorm, what should be the same base as webStorm, but I never noticed this. I thought they re-implrmented these checks. I was sure I read about it in the official youtrack. But I might be wrong here. I will definitly check this when I'm back.
But eigther way, the messages are the same it seems.
After a Quick search it seems we are both right. Until now they had an own Implementation but currently working on integrating Volar to it. But as far as I saw it seems to be still in testing ...
It works correctly for me with VSCode + Volar 1.6.5, VSCode + Volar 1.8.5, and PHPStorm + Volar 1.6.5. Jetbrains' homegrown typescript integration doesn't work with TS 5 so I didn't check that, and it's a heap of shit anyway so we won't support it.
Yeah i got same warning on Webstorm IDE but it is working...