Hi,
I created dynamic tabs using a List widget in OutSystems. When the underlying data for the tabs is refreshed, the tabs are re-rendered and the currently selected tab loses its selection state.
I would like to keep the currently selected tab active even after the tabs are re-rendered.
What would be the best approach or recommended solution for handling this scenario?
Thank you in advance for your guidance.
You can try using the StartingTab property of the tab widget by assigning a "Index" local variable in it. Then create a handler of the OnTabChange event. Inside that handler, assign the new active tab to the Index local variable.
I'm assuming you use a list, and rerender it because the number of tabs and the sequency they show up in can change between renders?
In that case, the index won't help you here, since that get's reassigned at each list refresh.
If that's not the case, why use a list and why refetch it ?
If i remember correctly, the tabs widget has all kinds of rendering problems if you make it dynamic, it is not intended for that use.