Description
I'm submitting a ... (check one with "x")
[x] bug report => Search github for a similar issue or PR before submitting
[ ] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primevue/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=110
Current behavior
When specifying an icon for Tag using the icon
attribute and using the slot for the text instead of the value
attribute, the icon is not shown.
Expected behavior
The icon should be shown whether the value
attribute or the slot is used.
What is the motivation / use case for changing the behavior?
It's often much more convenient to use the slot than the attribute, since the tag is often used for information that is assembled from multiple parts. For instance, a warning tag with the text "X of Y items completed" would be more easily expressed with <Tag severity="warning" icon="pi pi-exclamation-triangle">{{ X }} of {{ Y }} completed</Tag>
than using an interpolated string in the value
attribute.
Please tell us about your environment:
-
Vue version: 3.2.26
-
PrimeVue version: 3.10
-
Browser: all
Activity