如何在Streamlit中捕获选项卡变更事件

huangapple go评论54阅读模式
英文:

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"

huangapple
  • 本文由 发表于 2023年6月18日 20:24:15
  • 转载请务必保留本文链接:https://go.coder-hub.com/76500514.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定