SilkUI navigation tabs persistence

SilkUI navigation tabs persistence

  
Hi,

I am using a SilkUI Navigation tabs and each of its content has Upload controls in it to upload data to the entity.

When I click on third tab and upload an image then the page refreshes and the first tab gets selected. Is there a way to persist the tab clicked. I mean if I'm working in third tab, the tab switch should happen only when I click on it but not due to upload operation. Please advise.

Thanks
Hello Vimal,

Sorry for the late reply. For future Silk UI posts, please use the Silk UI Forums.

When you refresh the page, you are rebuilding the object. In the case of the Tabs and that is why the first tab become selected again.

However, there is a way do what you need.
The Tabs pattern has a property that allows you to select the open tab, so you can set a variable with the selected tab before you do the refresh:
  • On my page, I created a variable called "ActiveTab", with the DataType "Tabs Identifier". This variable will have a default value, just to make sure that the first time I open the page the first tab is selected.
a

  • On the Tabs itself, I use this variable on the property ActiveTab:


  • Finally, on the upload action triggered on the third tab, I'm setting the ActiveTab with the value "tab3". After the action ends, the page is reloaded and since the ActiveTab has the value tab3, the third tab will be open:




Please let us know if you have any questions.

Best Regards,
Samuel Jesus
Appreciate for the help!! Going forward I'll post the query in the specific related forum. Thanks!!