mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Fix map invalidation (#2129)
* Invalidation logic * comment and docstring * changelog * snapshot
This commit is contained in:
24
tests/snapshot_tests/snapshot_apps/tabs_invalidate.py
Normal file
24
tests/snapshot_tests/snapshot_apps/tabs_invalidate.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from textual.app import App, ComposeResult
|
||||
from textual.widgets import Label, TabbedContent, TabPane
|
||||
|
||||
|
||||
class TabApp(App):
|
||||
CSS = """
|
||||
TabPane {
|
||||
border: solid blue;
|
||||
}
|
||||
"""
|
||||
|
||||
def compose(self) -> ComposeResult:
|
||||
with TabbedContent():
|
||||
with TabPane("Tab 1", id="tab-1"):
|
||||
yield Label("hello")
|
||||
yield Label("hello")
|
||||
yield Label("hello")
|
||||
with TabPane("Tab 2", id="tab-2"):
|
||||
yield Label("world")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = TabApp()
|
||||
app.run()
|
||||
Reference in New Issue
Block a user