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

Tag doesn't show icon when slot is used instead of "value" attribute #1993

Closed
sid-6581 opened this issue Jan 15, 2022 · 0 comments · Fixed by #1994
Closed

Tag doesn't show icon when slot is used instead of "value" attribute #1993

sid-6581 opened this issue Jan 15, 2022 · 0 comments · Fixed by #1994
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Milestone

Comments

@sid-6581
Copy link
Contributor

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

@tugcekucukoglu tugcekucukoglu self-assigned this Jan 17, 2022
@tugcekucukoglu tugcekucukoglu added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jan 17, 2022
@tugcekucukoglu tugcekucukoglu added this to the 3.10.1 milestone Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working vue2-portable
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants