-
Notifications
You must be signed in to change notification settings - Fork 814
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Roll back ALLOW_CHILDREN and max height fix (#3814)
* max height * changelog * snapshot * unused exception
- Loading branch information
1 parent
4f459d6
commit 82d6e3e
Showing
11 changed files
with
208 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from textual.app import App, ComposeResult | ||
from textual.widgets import DataTable, Static | ||
|
||
|
||
class HappyDataTableFunApp(App[None]): | ||
"""The DataTable should expand as if it has height 1fr.""" | ||
|
||
CSS = """ | ||
DataTable { | ||
max-height: 100%; | ||
} | ||
""" | ||
|
||
def populate(self, table: DataTable) -> DataTable: | ||
for n in range(20): | ||
table.add_column(f"Column {n}") | ||
for row in range(100): | ||
table.add_row(*[str(row * n) for n in range(20)]) | ||
return table | ||
|
||
def compose(self) -> ComposeResult: | ||
with Static(id="s"): | ||
yield self.populate(DataTable()) | ||
|
||
|
||
if __name__ == "__main__": | ||
HappyDataTableFunApp().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters