We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Vuetify Version: 3.0.0-beta.2 Vue Version: 3.2.33 Browsers: Chrome 101.0.4951.64 OS: Mac OS 10.15.7
When icon prop in various components like VAlert, VAvatar, VAppbar, VBadget etc are passed as an object, there are numerous warning messages in the console indicating prop definition issues. This issue was confirmed by @nekosaur on discord - https://discord.com/channels/340160225338195969/976838579932241920/976841859332730890
Specifically - Invalid prop: type check failed for prop "icon". Expected Boolean | String, got Object
Invalid prop: type check failed for prop "icon". Expected Boolean | String, got Object
The reproduction link has the above mentioned components, but it looks like all components using icon as prop might have the same issue.
icon prop must accept string, boolean or object
icon prop accepts only string, throws warning when object is bound
https://stackblitz.com/github/techakayy/vuetify3-beta-unplugin-icons?file=src%2FApp.vue
The text was updated successfully, but these errors were encountered:
fix: allow component icons in all icon props
a4ef229
fixes #15162
Holy hell we've got a lot of icon props
Sorry, something went wrong.
Hi @KaelWD , thanks for fixing this issue.
So, the icon prop could be either a String, Object or a Function is what I understand looking at icons.tsx composable.
Could it also be 'Boolean'?
Back in vuetify2.x, the icon prop's type wasn't consistent across all components, for eg, v-btn api stated it as boolean (https://vuetifyjs.com/en/api/v-btn/#props), while v-alert stated it as boolean | string (https://vuetifyjs.com/en/api/v-alert/#props), while in most components it was of type 'any'. Cheers!
Two components have specific support for Boolean:
<v-btn icon>
:icon="false"
I suppose it could be added for other props too, currently setting them to false will throw Icon value is undefined or null
Icon value is undefined or null
KaelWD
No branches or pull requests
Environment
Vuetify Version: 3.0.0-beta.2
Vue Version: 3.2.33
Browsers: Chrome 101.0.4951.64
OS: Mac OS 10.15.7
Steps to reproduce
When icon prop in various components like VAlert, VAvatar, VAppbar, VBadget etc are passed as an object, there are numerous warning messages in the console indicating prop definition issues. This issue was confirmed by @nekosaur on discord - https://discord.com/channels/340160225338195969/976838579932241920/976841859332730890
Specifically -
Invalid prop: type check failed for prop "icon". Expected Boolean | String, got Object
The reproduction link has the above mentioned components, but it looks like all components using icon as prop might have the same issue.
Expected Behavior
icon prop must accept string, boolean or object
Actual Behavior
icon prop accepts only string, throws warning when object is bound
Reproduction Link
https://stackblitz.com/github/techakayy/vuetify3-beta-unplugin-icons?file=src%2FApp.vue
The text was updated successfully, but these errors were encountered: