TabView: previousicon slot doesn't work #5264
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Bug description
I have encountered an issue with
previousicon
slot (link to docs) for TabView component. While thenexticon
slot successfully replaces the icon with a different type and changes the color to purple, thepreviousicon
slot remains unchaged.Example: StackBlitz Example
Upon further investigation, I noticed that the interface
TabViewSlots
has a slot name -previousicon
. In contrary the source code of the TabView component, available on GitHub (line 16), indeed defines theprevicon
slot.So when I changed the slot from
<template #previousicon></template>
to<template #previcon></template>
it updated the icon.Example: StackBlitz Example
However, this modification leads to a TypeScript error, stating "Propterty 'previcon' does not exist on type 'TabViewSlots. ts(2339)'"
Therefore, adjusting the name in the
TabViewSlots
interface or changing the name of the slot inTabView.vue
would resolve the icon replacement issue.Reproducer
https://stackblitz.com/edit/primevue-create-vue-typescript-issue-template-ylqyl9?file=src%2FApp.vue
PrimeVue version
3.47.2
Vue version
3.x
Language
TypeScript
Build / Runtime
Vue CLI App
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
The "arrow-left" button updates according to the content in the slot
previousicon
The text was updated successfully, but these errors were encountered: