Set DataTable default style to max-height: 100% (#2974)

* Make the default max-height of a DataTable 100%

See #2959

* Fix the demo

Adding `max-height: 100%;` to DataTable has worked everywhere, except in the
demo, where it makes the table just plain flat out disappear. It looks like
it's down to a bug in Textual's CSS, possibly. This fixes the demo for now,
and a standalone issue will follow that dives into what's going on with this
particular combination of container and datatable styling.

* Update the ChangeLog

* Update the FAQ
This commit is contained in:
Dave Pearson
2023-07-25 10:39:39 +01:00
committed by GitHub
parent 0ff435601e
commit 4f3bb3fe15
5 changed files with 10 additions and 0 deletions

View File

@@ -8,3 +8,5 @@ alt_titles:
If scrolling in your `DataTable` is _apparently_ broken, it may be because your `DataTable` is using the default value of `height: auto`.
This means that the table will be sized to fit its rows without scrolling, which may cause the *container* (typically the screen) to scroll.
If you would like the table itself to scroll, set the height to something other than `auto`, like `100%`.
**NOTE:** As of Textual v0.31.0 the `max-height` of a `DataTable` is set to `100%`, this will mean that the above is no longer the default experience.