Tabpanel and badge

UI Components for Vue
Post Reply
fobebam414
Posts: 2
Joined: 24 Aug 2021, 23:20

24 Aug 2021, 23:25

When trying to add a badge to a tabpanel, I get the following warning, and no badge is displayed on the tabpanel:

Code: Select all

1083 [Vue warn]: Runtime directive used on component with non-element root node. The directives will not function as intended. 
  at <TabPanel header="Hello World" > 
  at <TabView> 
  at <App>
Is it possible to display a badge on a tab panel?

fobebam414
Posts: 2
Joined: 24 Aug 2021, 23:20

26 Aug 2021, 00:44

Found the answer. use the header template:

Code: Select all

  <Tabpanel>
    <template #header>
        <span>{{dynamictitle}}&nbsp;</span>
        <Badge value="X" severity="danger" v-show="showbadge"></Badge>
    </template>
...
</Tabpanel>

Post Reply

Return to “PrimeVue”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests