Tag doesn't show icon when slot is used instead of "value" attribute #1993
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
vue2-portable
Milestone
I'm submitting a ... (check one with "x")
Current behavior
When specifying an icon for Tag using the
icon
attribute and using the slot for the text instead of thevalue
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 thevalue
attribute.Please tell us about your environment:
Vue version: 3.2.26
PrimeVue version: 3.10
Browser: all
The text was updated successfully, but these errors were encountered: