Docs change - use `pane` instead of `tab` for an event listener on tab change
Closed this issue · 2 comments
shapiromatron commented
We tried adding an event listener for a tab change using the docs here, but couldn't get it to work: https://textual.textualize.io/guide/events/#applying-css-selectors-to-arbitrary-attributes. Should the docs be updated to use pane
instead of tab
, or are we doing something wrong? Specifically this snippet:
@on(TabbedContent.TabActivated, tab="#home")
def home_tab(self) -> None:
self.log("Switched back to home tab.")
I got it working, I think it's related to the breaking change described in https://github.com/Textualize/textual/blob/main/CHANGELOG.md#0460---2023-12-17
Breaking change: tab is no longer a @on decorator selector for TabbedContent.TabActivated -- use pane instead #3815
github-actions commented
github-actions commented
Don't forget to star the repository!
Follow @textualizeio for Textual updates.