p-tabview closing active first tab opens not the next tab #16313
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
Describe the bug
the current implementation in closable tabview opens the first tab which isn't closed or disabled if the selected tab is closed.
this works fine for any tab but the first one.
primeng/src/app/components/tabview/tabview.ts
Line 763 in 1f6c5d9
Closing the active tab after the "new" active tab is selected leads to a non active tab when the first tab is closed.
simple solution is to close the tab first before selecting a new tab
Environment
https://stackblitz.com/edit/github-2c62mz?file=src%2Fapp%2Fapp.component.html
Reproducer
https://stackblitz.com/edit/github-2c62mz?file=src%2Fapp%2Fapp.component.html
Angular version
18.2.1
PrimeNG version
17.18.9
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
20.11.1
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
the second tab (Header II) should be selected
The text was updated successfully, but these errors were encountered: