Component: Accordion do not reset selected active Tab on new dynamic tab data #16634
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone
Describe the bug
Scenario:
and say press tab 3 to open it.
2. Then tabs array is changed but active tab is still tab 3 that creates bad UX (since data can be totally different).
3. No public method to drop it. Need to grab accordion instance and manually assign _activeIndex and tab.selected=false
Environment
Angular 18
Primeng 17
Reproducer
https://stackblitz.com/edit/lpeujv?file=src%2Fapp%2Faccordion-dynamic-demo.ts
Angular version
18.0.2
PrimeNG version
17.18.11
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
v20.9.0
Browser(s)
Chrome
Steps to reproduce the behavior
Expected behavior
Or
Alternative - accordion instance public method (after grabbing instance with ViewChild) to reset active Tab
The text was updated successfully, but these errors were encountered: