From 90895f2f8541097eba33de1beb54200f124957b1 Mon Sep 17 00:00:00 2001 From: TomJGooding <101601846+TomJGooding@users.noreply.github.com> Date: Thu, 14 Mar 2024 18:16:03 +0000 Subject: [PATCH] fix(datatable): change max-height back to 100% The `max-height` of the `DataTable` was changed to 100vh rather than 100% in #3566, because at the time this caused issues with auto height containers, as described in #2975. However this issue was later fixed in #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 #4286. --- CHANGELOG.md | 1 + src/textual/widgets/_data_table.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 497ae2bc23..047fe077a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/textual/widgets/_data_table.py b/src/textual/widgets/_data_table.py index 245af7938f..15d73097ef 100644 --- a/src/textual/widgets/_data_table.py +++ b/src/textual/widgets/_data_table.py @@ -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;