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
[x] bug report
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://forum.primefaces.org/viewforum.php?f=57
Current behavior
setting activeIndex in the onTabClose function is getting ignored/overriden by TabView.
Expected behavior
Expecting setActiveIndex to take priority in the onCloseTab function being called.
Minimal reproduction of the problem with instructions
I have three controlled, closable tabs, that are rendered via an array, and a onTabClose function where I do some logic on closing a tab. I also have an external button that closes a tab.
If Tab 3 is active and I close Tab 2 via the external button, Tab 3 is still active as per the logic given there to set the activeIndex.
In the case of Tab 3 is active and I close Tab 2 via via the X icon on the said tab, the activeIndex shifts to Tab 1 instead of keeping Tab 3 as still active. I tried setting the activeIndex to highlight Tab 3 as the active one but it still goes to Tab 1.
React version:
17.0.2
PrimeReact version:
7.1.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome
The text was updated successfully, but these errors were encountered:
I'm submitting a ... (check one with "x")
Codesandbox Case (Bug Reports)
https://codesandbox.io/s/qjx332qq4
Current behavior
setting activeIndex in the onTabClose function is getting ignored/overriden by TabView.
Expected behavior
Expecting setActiveIndex to take priority in the onCloseTab function being called.
Minimal reproduction of the problem with instructions
I have three controlled, closable tabs, that are rendered via an array, and a onTabClose function where I do some logic on closing a tab. I also have an external button that closes a tab.
If Tab 3 is active and I close Tab 2 via the external button, Tab 3 is still active as per the logic given there to set the activeIndex.
In the case of Tab 3 is active and I close Tab 2 via via the X icon on the said tab, the activeIndex shifts to Tab 1 instead of keeping Tab 3 as still active. I tried setting the activeIndex to highlight Tab 3 as the active one but it still goes to Tab 1.
React version:
17.0.2
PrimeReact version:
7.1.0
Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
Chrome
The text was updated successfully, but these errors were encountered: