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

v16.9.0: p-megaMenu title property of each item in the [model]="items" does not work #14217

Closed
eXpertise7 opened this issue Nov 27, 2023 · 4 comments
Assignees
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible

Comments

@eXpertise7
Copy link

eXpertise7 commented Nov 27, 2023

Describe the bug

In the [email protected] (and probably every primeng 16 version - did not test before) title property which is filled in the TypeScript while initializing items array list is not working.

Environment

Windows 10, Google Chrome Version 119.0.6045.160 (Official Build) (64-bit) up to date, Angular 16

Reproducer

https://stackblitz.com/edit/5lxh8n-drmabs?file=src%2Fapp%2Fdemo%2Fwrapper.component.ts

Angular version

16.2.0

PrimeNG version

16.9.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.18.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Hover with the mouse on the any p-megaMenu item

Expected behavior

Tooltip title should be appearing. This had worked in the PrimeNG 15.2.0 (confirmed) which I've used in the development and production environment.

@eXpertise7 eXpertise7 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Nov 27, 2023
@eXpertise7 eXpertise7 changed the title v16.9.0: p-megaMenu title property of [model]="items" does not work v16.9.0: p-megaMenu title property of each item in the [model]="items" does not work Nov 27, 2023
@cetincakiroglu
Copy link
Contributor

Hi,

You can use itemTemplate to customize the menu item as you wish. Besides, I've checked the v14 and the title is missing as you mentioned but it only used in anchors to append HTML attribute of title, it wasn't a visible thing. Title attribute removed from the anchors with the accessibility update since it was redundant in the anchor.

@eXpertise7
Copy link
Author

eXpertise7 commented Nov 28, 2023

I generate megamenu items fully in the typescript file - items array bound to the [model] input of p-megaMenu, I won't use pTemplate="item". Not sure why did you guys think it was redundant in the anchor.

That was the only way to show some kind of tooltip in the p-megaMenu for each item.

[email protected] - title tooltip:
image

@djohle
Copy link

djohle commented Apr 26, 2024

At the risk of being a "me too" post...

I ran into this issue as well during a recent upgrade from a 15.x version the 17.x release. I also have a menu configured completely in the .ts file which has title defined for certain items. I am using PanelMenu, but it is consistent with the other menu components.

I also confirmed with the stackblitz example from the documentation page, adding a title to the configuration does not have any effect on the final output..

What is interesting is that I see in the default itemTemplate defined in panelmenu.ts there is a provision for setting it:

[attr.title]="getItemProp(processedItem, 'title')"

However in the actual HTML that is rendered it just doesn't include this attribute 🤷‍♂️

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap?
Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
Projects
None yet
Development

No branches or pull requests

5 participants