You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1 - Open https://primeng.org/tabview#closable
2 - Select the third tab
3 - Close the second tab
4 - See that the marking remains on the third tab, even though it doesn't exist
Expected behavior
4 - Marking should go to tab 2
The text was updated successfully, but these errors were encountered:
closeTab(tab: TabPanel) {
if (tab.disabled) {
return;
}
if (tab.selected) {
this.tabChanged = true;
tab.selected = false;
for (let i = 0; i < this.tabs.length; i++) {
let tabPanel = this.tabs[i];
if (!tabPanel.closed && !tab.disabled) {
tabPanel.selected = true;
break;
}
}
} else { //here is update
this.tabChanged = true;
}
tab.closed = true;
}
mehmetcetin01140
added
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
Jul 26, 2024
Describe the bug
When closing a tab, the marking indicating that it is selected becomes incorrect
Environment
Primeng TaView Closeable Sample
Reproducer
https://primeng.org/tabview#closable
Angular version
18
PrimeNG version
17.18.5
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
Sample Primeng
Browser(s)
Chrome
Steps to reproduce the behavior
1 - Open https://primeng.org/tabview#closable
2 - Select the third tab
3 - Close the second tab
4 - See that the marking remains on the third tab, even though it doesn't exist
Expected behavior
4 - Marking should go to tab 2
The text was updated successfully, but these errors were encountered: