mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
table height fix
This commit is contained in:
@@ -76,7 +76,7 @@ class ScrollView(Widget):
|
||||
self._size = size
|
||||
virtual_size = self.virtual_size
|
||||
self._scroll_update(virtual_size)
|
||||
self._container_size = size
|
||||
self._container_size = size - self.styles.gutter.totals
|
||||
self.scroll_to(self.scroll_x, self.scroll_y, animate=False)
|
||||
self.refresh()
|
||||
|
||||
|
||||
@@ -269,9 +269,10 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
|
||||
column.content_width = max(column.content_width, content_width)
|
||||
|
||||
total_width = sum(column.render_width for column in self.columns)
|
||||
header_height = self.header_height if self.show_header else 0
|
||||
self.virtual_size = Size(
|
||||
total_width,
|
||||
max(len(self._y_offsets), (self.header_height if self.show_header else 0)),
|
||||
len(self._y_offsets) + header_height,
|
||||
)
|
||||
|
||||
def _get_cell_region(self, row_index: int, column_index: int) -> Region:
|
||||
|
||||
Reference in New Issue
Block a user