-
Notifications
You must be signed in to change notification settings - Fork 189
Open
Description
With ionic 5 and react activeTabIndex of <SuperTabs> tag not work if value change.
const [tabIdx, setTabIdx] = useState(0);
For ex: Initial state of tabIdx is 0 so work properly but if tabIdx change with setTabIdx(2); nothing happen. I mean that component rerender successfully but tab not change.
In react mode how to change tab programmatically?
<SuperTabs activeTabIndex={tabIdx} config={{ debug: false, sideMenu: 'left', allowElementScroll: true, nativeSmoothScroll: true }}>
<SuperTabsToolbar slot="top" color="antracite">
<SuperTabButton>
<IonLabel>TestTAB1</IonLabel>
</SuperTabButton>
<SuperTabButton>
<IonLabel>TestTAB2</IonLabel>
</SuperTabButton>
<SuperTabButton>
<IonLabel>TestTAB3</IonLabel>
</SuperTabButton>
</SuperTabsToolbar>
<SuperTabsContainer autoScrollTop>
<TestTAB1 />
<TestTAB2 />
<TestTAB3 />
</SuperTabsContainer>
</SuperTabs>
nickmcsimpson
Metadata
Metadata
Assignees
Labels
No labels