primefaces / primeng

The Most Complete Angular UI Component Library
https://primeng.org
Other
10.58k stars 4.61k forks source link

TabMenu: Tooltip does not work through title #15500

Open mhazak opened 6 months ago

mhazak commented 6 months ago

Describe the bug

The tabmenu items don't show the tooltip received from the title attribute.

Environment

"@angular/common": "^16.2.8" "primeng": "^16.9.1",

Reproducer

https://stackblitz.com/edit/epjkez?file=src%2Fapp%2Fdemo%2Ftab-menu-active-demo.ts

Angular version

16.2.8

PrimeNG version

16.9.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.17.1

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

If some of the MenuItem contains a title attribute, it should automatically render the tooltip.

Sinan997 commented 6 months ago

update your items array like this

this.items = [
  { label: 'Homee', icon: 'pi pi-fw pi-home', tooltipOptions: { tooltipLabel:'Test123' }},
  { label: 'Calendar', icon: 'pi pi-fw pi-calendar', tooltipOptions: { tooltipLabel:'Calendar' }},
  { label: 'Edit', icon: 'pi pi-fw pi-pencil', tooltipOptions: { tooltipLabel: 'Edit' }},
  {
    label: 'Documentation',
    icon: 'pi pi-fw pi-file',
    tooltipOptions: { tooltipLabel: 'Documentation' }
  },
  { label: 'Settings', icon: 'pi pi-fw pi-cog', tooltipOptions: { tooltipLabel: 'Settingsl' }},
];