Open majkers opened 2 years ago
I noticed something similar for DynamicDialog and Dialog in v15/v16 with Accordion and Panel. When the dynamic dialog is opened, all tabs are quickly expanded and then collapses after a few milliseconds.
When closing the dynamic dialog, all the tabs are re-expanded again before it disappears. It may be hard to see because it happens so quickly.
I was hoping the accordion would remain collapsed the entire time unless the user actually clicks the tabs.
Here is a forked example based off the DynamicDialog docs for v16, but I replaced p-table with p-accordion: https://stackblitz.com/edit/luvqct?file=src%2Fapp%2Fdemo%2Fproductlistdemo.ts
The error is still present in primeng v17.16.1. Using an accordion in a dialog leads to inconsistent behavior. When closing the dialog, the accordion expands all tabs for a few milliseconds before closing, and when reopening the dialog, the tabs are open. Checkout this simple example.
Issue also exists if you're using p-sidebar component. Opening a sidebar on the second attempt will open all the accordions.
Still happening with v17.18.0, it's so annoying
Le problème existe également si vous utilisez le composant p-sidebar. L'ouverture d'une barre latérale à la deuxième tentative ouvrira tous les accordéons.
I confirm bug with sidebar. How resolve this? I'm at version 17.18.4.
Le problème existe également si vous utilisez le composant p-sidebar. L'ouverture d'une barre latérale à la deuxième tentative ouvrira tous les accordéons. Démo : https://stackblitz.com/edit/z4x4wd
I confirm bug with sidebar. How resolve this? I'm at version 17.18.4.
for a work around I've used a skeleton loader with a setTimeout function. On hide, set the loader to true and on show set it to false after small amount of time allowing items to render properly inside the p-sidebar.
public onPanelClick(): void {
//we use signal in the template for the visible property that can be opened from x amount of places
this.myService.showSidebar();
setTimeout(() => {
this.loading = false;
}, 350);
}
public onHideSidebarClick(): void {
this.myService.hideSidebar();
this.loading = true;
}
This is still happening to me on angular 18.2.7
and primeng 17.18.9
for a p-accordion
inside a p-dialog
, when the dialog closes then opens again, all accordions inside it are fully expanded.
Here's an example, first time opening the dialog (looks good)
close the dialog then reopen it... all accordions are expanded! and the tiny arrow directions are all wrong!
Describe the bug
Everything is written in https://github.com/primefaces/primeng/issues/9453
Environment
in issue https://github.com/primefaces/primeng/issues/9453
Reproducer
https://stackblitz.com/edit/primeng-dialog-accordion-problem-tqtn9k?file=package.json
Angular version
14.2.10
PrimeNG version
14.2.1
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
14.17.3
Browser(s)
All
Steps to reproduce the behavior
in issue https://github.com/primefaces/primeng/issues/9453
Expected behavior
in issue https://github.com/primefaces/primeng/issues/9453