英文:
How to catch tab change event in streamlit
问题
我是新手Streamlit,希望能够检测当我从一个标签切换到另一个标签时,以便执行特定的反应。我知道Streamlit没有内置的标签切换事件。是否有解决这个问题的方法?谢谢。
英文:
I am new to Streamlit and would like it to be able to detect when I switch from one tab to another, so it can perform certain specific reactions. I am aware that Streamlit does not have a built-in tab change event. Are there any solutions to this issue? Thank you.
答案1
得分: 1
有关此事在Streamlit论坛上已经有过讨论,简而言之,选项卡只是视觉元素,它们没有事件,但是在GitHub上引入了一个叫做“TabBarItemData”的替代组件。
英文:
There was already a discussion about that on a stramlit forum, in short, tabs are just visual elements, they don't have events, but they introduced an alternative component on this github, called "TabBarItemData"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论