Add tab dynamically

Hello everyone,
I am looking for a way to add a tab to an existaing tab tuple.
For example :

tabs = st.tabs([“Selection”, “results”])

And I would like to add a new tab like :

tabs.append([‘newtab’])

to have tabs updated and equivalent to :

tabs = st.tabs([“Selection”, “results”, “newtab”])

Any idea ?
Thanks.
David

Hey @dnaura, you can achieve that by using sessions state. In our demo app for tabs, we are also adding tabs dynamically. You can have a look at the code here.

2 Likes

Thanks a lot!
I will give it a try!

Has it worked for you?

Yes !
It worked!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.