Hi I am configuring the starting tab for mobile tabs and have issue set it right.

So I have only two tabs: tab 1 and tab 2 in my case, but I would like to set starting tab after I fetch data from other sources, meaning I would like the flexibility of changing starting tab based on the data returned.

I have tried following cases, but none of it seems working:
1. Set if condition in starting tab, which it appears that it always use the default 0 value. So I'm not able to switch to tab 2

2. I use a local integer variable (default 0) as input of starting tab, and update its value on after fetch of fetch data from other sources. This integer variable changed its value to 1 based on data return, however the tabs still stay on tab 1.

Any one can help or any suggestion on how to handle this starting tab change? Thank you! 


Hi Yi, 

I would say you will need to put your tabs inside an IF using a variable that defaults to False (tab is not rendered). 

In the OnAfterFetch, you set first the starting tab and than change the condition variable to true. 

You can use the False branch of the IF to show a spinner or a message that data is being fetched, for example.