Skip to content

Commit

Permalink
fix(datatable): change max-height back to 100%
Browse files Browse the repository at this point in the history
The `max-height` of the `DataTable` was changed to 100vh rather than
100% in Textualize#3566, because at the time this caused issues with auto height
containers, as described in Textualize#2975.

However this issue was later fixed in Textualize#3814. This PR changes the
`max-height` of the `DataTable` back to 100%, as 100vh will actually
break common layouts and seems no longer required to workaround this
auto height issue.

Fixes Textualize#4286.
  • Loading branch information
TomJGooding committed Mar 14, 2024
1 parent 6b8790e commit 90895f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed a style leak from `TabbedContent` https://github.com/Textualize/textual/issues/4232
- Fixed active hidden scrollbars not releasing the mouse https://github.com/Textualize/textual/issues/4274
- Fixed the mouse not being released when hiding a `TextArea` while mouse selection is happening https://github.com/Textualize/textual/issues/4292
- Fixed `DataTable` scrolling issues by changing `max-height` back to 100% https://github.com/Textualize/textual/issues/4286

### Changed

Expand Down
2 changes: 1 addition & 1 deletion src/textual/widgets/_data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
background: $surface ;
color: $text;
height: auto;
max-height: 100vh;
max-height: 100%;
}
DataTable > .datatable--header {
text-style: bold;
Expand Down

0 comments on commit 90895f2

Please sign in to comment.