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

p-table and p-menubar together: Regression 16.0.2 -> 16.1.0 #13405

Closed
psarno opened this issue Jul 31, 2023 · 5 comments
Closed

p-table and p-menubar together: Regression 16.0.2 -> 16.1.0 #13405

psarno opened this issue Jul 31, 2023 · 5 comments
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response

Comments

@psarno
Copy link

psarno commented Jul 31, 2023

Describe the bug

We have a p-menubar component, inside of a <ng-template pTemplate="caption">, in a p-table.

The p-table has selectionMode="multiple" and allows the user to check off individual rows:

[(selection)]="selectedExtensions"

We hook the onRowSelect() and onRowUnselect() methods and create the menubar items, where some of their disabled properties is set by the number of selected rows:

this.toolbarMenuItems = [
        {
          label: r.DELETE_SELECTED,
          disabled: this.selectedExtensions.length === 0
        },
        ... etc
}

I can verify that in version 16.0.2 of PrimeNG, the menubar items properly enable/disable when checking off rows in the table.

In version 16.1.0 they do not.

I can not create a repro at this time as the PrimeNG template is out of date on StackBlitz and trying to bring it up to 16.1.0 results in a separate issue.

Environment

PrimeNG 16.1.0
Angular ~16.0.0

Reproducer

No response

Angular version

16.1.6

PrimeNG version

16.0.0

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.16.0

Browser(s)

No response

Steps to reproduce the behavior

  1. Using PrimeNG 16.1.0, place a p-menubar in the header template of a p-table
  2. In OnRowSelect() and OnRowUnselect(), re-create the menubar items, setting disabled equal to selectedItems.Count > 0

Expected behavior

Items properly enable/disable based on selection count.

Actual behavior: Items remain disabled (initial state).

@psarno psarno added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Jul 31, 2023
@cetincakiroglu
Copy link
Contributor

Hi,

Could you please share a Stackblitz reproducer?

@cetincakiroglu cetincakiroglu added Resolution: Cannot Replicate Issue could not be replicated by Core Team and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Aug 1, 2023
@github-actions
Copy link

github-actions bot commented Aug 1, 2023

We're unable to replicate your issue, if you are able to create a reproducer by using PrimeNG Issue Template or add details please edit this issue. This issue will be closed if no activities in 20 days.

@psarno
Copy link
Author

psarno commented Aug 1, 2023

Could you please share a Stackblitz reproducer?

@cetincakiroglu As mentioned in the submission I can not get 16.1.0 working on StackBlitz (I linked to the issue I'm having there).

The PrimeNG suggested template is still using version 14 and this does not reproduce the issue.

Copy link

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

@github-actions github-actions bot added the Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response label Nov 30, 2023
Copy link

github-actions bot commented Dec 7, 2023

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Cannot Replicate Issue could not be replicated by Core Team Resolution: Stale Issue or pull request is inactivity and unfortunately it will be *closed* if there is no response
Projects
None yet
Development

No branches or pull requests

2 participants