Skip to content

Commit

Permalink
Take the prefix into account during tab en/disable
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Dec 7, 2023
1 parent a58581d commit 06e7b87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/textual/widgets/_tabbed_content.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ def _on_tabs_tab_disabled(self, event: Tabs.TabDisabled) -> None:
try:
with self.prevent(TabPane.Disabled):
self.get_child_by_type(ContentSwitcher).get_child_by_id(
tab_id, expect_type=TabPane
ContentTab.sans_prefix(tab_id), expect_type=TabPane
).disabled = True
except NoMatches:
return
Expand All @@ -584,7 +584,7 @@ def _on_tabs_tab_enabled(self, event: Tabs.TabEnabled) -> None:
try:
with self.prevent(TabPane.Enabled):
self.get_child_by_type(ContentSwitcher).get_child_by_id(
tab_id, expect_type=TabPane
ContentTab.sans_prefix(tab_id), expect_type=TabPane
).disabled = False
except NoMatches:
return
Expand Down

0 comments on commit 06e7b87

Please sign in to comment.