Skip to content

Commit

Permalink
SVY-19012 TiNG tabIndex is reverted if there is any other tab model
Browse files Browse the repository at this point in the history
change

if the tabs are again send as changed (right after it is displayed)
and there is no selectedTab yet then don't try to set the selectedtab
because that could override the tabindex that is also coming.

The tab should only be reselected if there was one in the first place if
the tabs property is changed.
  • Loading branch information
jcompagner committed Mar 6, 2024
1 parent 4f7ee6d commit 1b0e800
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/bootstrapcomponents/src/bts_basetabpanel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export class ServoyBootstrapBaseTabPanel<T extends HTMLElement> extends ServoyBo
if (changes['tabs']) {
// quickly generate the id's for a the tab html id (and selecting it)
this.generateIDs();
if (!changes['tabs'].firstChange) {
if (!changes['tabs'].firstChange && this.selectedTab) {
const index = this.getRealTabIndex();
if (index >= 0) {
this.select(this.tabs[index]);
Expand Down

0 comments on commit 1b0e800

Please sign in to comment.