Skip to content

Commit bb651c2

Browse files
committed
SVY-20313 tabIndex does not update accurately if set after calling
removeTabAt function [SERVOY] - rename due to weird value in closure
1 parent fe3219a commit bb651c2

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

projects/bootstrapcomponents/src/bts_basetabpanel.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ export class ServoyBootstrapBaseTabPanel<T extends HTMLElement> extends ServoyBo
4242
// quickly generate the id's for a the tab html id (and selecting it)
4343
this.generateIDs();
4444
if (!changes['tabs'].firstChange && this.selectedTab) {
45-
const index = this.getRealTabIndex();
46-
if (index >= 0) {
47-
if (this.tabs[index] == this.selectedTab && this.selectedTab.containedForm != this.selectedTabContainedForm) {
45+
const realTabIndex = this.getRealTabIndex();
46+
if (realTabIndex >= 0) {
47+
if (this.tabs[realTabIndex] == this.selectedTab && this.selectedTab.containedForm != this.selectedTabContainedForm) {
4848
// contained form was changed
4949
let promise;
5050
if (this.selectedTabContainedForm)
@@ -62,8 +62,8 @@ export class ServoyBootstrapBaseTabPanel<T extends HTMLElement> extends ServoyBo
6262
else {
6363
setTimeout(() => {
6464
// wait for tabindex changes that come later
65-
if (index == this.getRealTabIndex()){
66-
this.select(this.tabs[index]);
65+
if (realTabIndex == this.getRealTabIndex()){
66+
this.select(this.tabs[realTabIndex]);
6767
}
6868
}, 0);
6969
}

0 commit comments

Comments
 (0)