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

TabMenu: Breaking change added while fixing #13910 #14044

Closed
Michael-Ziluck opened this issue Nov 7, 2023 · 6 comments
Closed

TabMenu: Breaking change added while fixing #13910 #14044

Michael-Ziluck opened this issue Nov 7, 2023 · 6 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

@Michael-Ziluck
Copy link

Michael-Ziluck commented Nov 7, 2023

Describe the bug

Before #13910 and #13911, the following was an acceptable usage of the template for tab menus:

<p-tabMenu [(activeItem)]="currentTab" [model]="tabItems">
  <ng-template pTemplate="item" let-item>
    {{ item.label | translate: I18N_PRODUCT }}
  </ng-template>
</p-tabMenu>

Which would result in this display:
image

Now with the same markup, it results in this:
image

The change is because previously, the was within the tag. I know you updated the docs to reflect this, but shouldn't breaking changes be constrained to major version changes? Seems wildly arbitrary and inconvenient for users to have to make the change. I'll be opening a bug issue as well.

Environment

Angular: 16.2.12
PrimeNG: 16.7.1
Browser: latest Chrome

Reproducer

No response

Angular version

16.2.12

PrimeNG version

16.7.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

N/A

Browser(s)

Chrome

Steps to reproduce the behavior

No response

Expected behavior

No response

@Michael-Ziluck Michael-Ziluck 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 7, 2023
@jsdevtom
Copy link

jsdevtom commented Nov 10, 2023

I can reproduce.

Version 16.5.0 didn't have this bug. Version 16.6.0 does.

@philkrpp
Copy link

Also same for me.

@NexGenUA
Copy link

I have the same problem.
Also, when you click on a tab, routing does not work (routerLink).
What ideas? Manually process a click on a tab, taking into account all routing options?
Angular: 17.0.7
PrimeNG: 17.2.0

@DarkLeopard
Copy link

DarkLeopard commented Jan 21, 2024

Quick fix: add a wrapper to your template following the example.
<a role="menuitem" pripple [routerLink]="item.routerLink" class="p-ripple p-element p-menuitem-link">

@Michael-Ziluck
Copy link
Author

@DarkLeopard Appreciate sharing the fix for those who are searching for a solution to this problem. For the original issue though, this should have only been introduced on a major version change as the update breaks existing usages of the component.

@mehmetcetin01140
Copy link
Contributor

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 open a new issue so we can include it in our roadmap?

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

6 participants