California | Upgrade v15.02 to v16.02 Popup menu bugs when using in p-table #551
Replies: 7 comments
-
Hi, What is your Angular version? If you using not synced versions (Angular15 - PrimeNG16) you may have some issues, we advise users to use synced versions. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Prime NG version is 16.0.9 and angular version is 16.0.2
…On Tue, Nov 28, 2023, 1:46 PM Çetin ***@***.***> wrote:
Hi,
What is your Angular version? If you using not synced versions (Angular15
- PrimeNG16) you may have some issues, we advise users to use synced
versions.
—
Reply to this email directly, view it on GitHub
<#551 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYTYK7VWJDO3AXUQYH4UNDYGWJHFAVCNFSM6AAAAAA73NHLV6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TMOBZGE4DO>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hi, To replicate the issue on our local template, could you please share the related code pieces in a single comment by formatting the code so we can copy-paste and reproduce the behavior? |
Beta Was this translation helpful? Give feedback.
-
Yes, I will do that.
…On Thu, Dec 7, 2023 at 3:49 PM Çetin ***@***.***> wrote:
Hi,
To replicate the issue on our local template, could you please share the
related code pieces in a single comment by formatting the code so we can
copy-paste and reproduce the behavior?
—
Reply to this email directly, view it on GitHub
<#551 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYTYK5I2FWU73Z7MJYJFIDYIGGMHAVCNFSM6AAAAAA73NHLV6VHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM3TOOBWGU3TI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Md. Nazrul Islam
AM (Software Engineer)
Smart Aspects Limited
House 14, Road 13, Sector 13
Uttara, Dhaka - 1230
Email: ***@***.***,
***@***.***
Mobile: 01912813744
01675951380
Phone (office): 02-8955481
|
Beta Was this translation helpful? Give feedback.
-
Dear Primeng Team, The code link https://github.com/nazrulcsebd/california-theme-problem-grid |
Beta Was this translation helpful? Give feedback.
-
We are also facing the same problem in our project. Waiting for a nice solution. |
Beta Was this translation helpful? Give feedback.
-
We also got this problem. Looking for solution |
Beta Was this translation helpful? Give feedback.
-
Hi! When upgrade v15.0.2 to v16.1.0. Everything looks good, but the Popup menu does not work in p-table. The popup menu renders frequently and the click event does not work in one click, it needs double click. If I initiate the menu items on ngOnInit as static items then it works fine. But, if I use a function to generate the menu items based on table row data then the problem occurs.
I'm using the California template (Also updated it to v16.9.0). What can I do now, have any suggestions or some upgrade guide or considerations for my context upgrade?
I give the sample code for dynamic binding of menu items.
<p-table id="tblAppPackage" [value]="packageGridObj" styleClass="p-datatable-gridlines"> <ng-template pTemplate="header"> <tr> <th style="width: 5%">Sr. No.</th> <th style="width: 8%">Status</th> <th style="width: 6%">Action</th> </tr> </ng-template> <ng-template pTemplate="body" let-package let-ri="rowIndex"> <tr> <td class="text-center" style="width: 5%;">{{ startRowIndex + ri + 1 }}</td> <td style="width: 8%" class="text-center"> <span *ngIf="checkPackageStatus(package?.status)" style="color: red; font-weight: bold;">{{ checkPackageStatusValue(package) }}</span> <span *ngIf="!checkPackageStatus(package?.status)">{{ package?.status }}</span> </td> <td class="text-center" style="width: 6%"> <p-menu #menu [popup]="true" [model]="getPackageOptionMenuItem(package)" appendTo="body"></p-menu> <button type="button" pButton icon="pi pi-chevron-down" label="Options" (click)="menu.toggle($event)" style="width:auto"></button> </td> </tr> </ng-template> </p-table>
The TS file code for dynamic menu items is based on row data.
`
getPackageOptionMenuItem(packageItem: any) {
let items: MenuItem[] = [];
}
`
I inspect the browser when dynamically generating the menu options. Here is the snapshot,
But when given static menu items it works fine.
the code is given below
<p-table id="tblAppPackage" [value]="packageGridObj" styleClass="p-datatable-gridlines"> <ng-template pTemplate="header"> <tr> <th style="width: 5%">Sr. No.</th> <th style="width: 8%">Status</th> <th style="width: 6%">Action</th> </tr> </ng-template> <ng-template pTemplate="body" let-package let-ri="rowIndex"> <tr> <td class="text-center" style="width: 5%;">{{ startRowIndex + ri + 1 }}</td> <td style="width: 8%" class="text-center"> <span *ngIf="checkPackageStatus(package?.status)" style="color: red; font-weight: bold;">{{ checkPackageStatusValue(package) }}</span> <span *ngIf="!checkPackageStatus(package?.status)">{{ package?.status }}</span> </td> <td class="text-center" style="width: 6%"> <p-menu #menu [popup]="true" [model]="itemsOptions" appendTo="body"></p-menu> <button type="button" pButton icon="pi pi-chevron-down" label="Options" (click)="menu.toggle($event)" style="width:auto"></button> </td> </tr> </ng-template> </p-table>
The TS file code is given below
`
itemsOptions: MenuItem[] = [];
ngOnInit(): void {
];
}
`
Please solve the problem or give assistance on what's going wrong here.
Beta Was this translation helpful? Give feedback.
All reactions