Skip to content

Commit

Permalink
Merge pull request #224 from netgrif/NAE-1926
Browse files Browse the repository at this point in the history
[NAE-1926] Can't close Tab in Tab view
  • Loading branch information
renczesstefan authored Dec 13, 2023
2 parents a399e36 + 27f356d commit 9a2a3d4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ export class TabView implements TabViewInterface {
if (!force && !this.openedTabs[index].canBeClosed) {
throw new Error(error);
}
if (index === this.selectedIndex.value && this.openedTabs[index].parentUniqueId) {
if (index === this.selectedIndex.value && this.openedTabs[index].parentUniqueId &&
this.openedTabs.findIndex(tab => tab.uniqueId === this.openedTabs[index].parentUniqueId) !== -1) {
this.switchToTabUniqueId(this.openedTabs[index].parentUniqueId);
}
if (index === this.selectedIndex.value && this.selectedIndex.value + 1 < this.openedTabs.length) {
Expand Down

0 comments on commit 9a2a3d4

Please sign in to comment.