Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Fixed `RichLog` writing at wrong width when `write` occurs before width is known (e.g. in `compose` or `on_mount`) https://github.com/Textualize/textual/pull/4978
- Fixed `RichLog.write` incorrectly shrinking width to `RichLog.min_width` when `shrink=True` (now shrinks to fit content area instead) https://github.com/Textualize/textual/pull/4978
- Fixed flicker when setting `dark` reactive on startup https://github.com/Textualize/textual/pull/4989
- Fixed `DataTable` cached height issue on re-populating the table when using auto-height rows https://github.com/Textualize/textual/pull/4992

## [0.79.1] - 2024-08-31

Expand Down
5 changes: 5 additions & 0 deletions src/textual/widgets/_data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ def _y_offsets(self) -> list[tuple[RowKey, int]]:
for row in self.ordered_rows:
y_offsets += [(row.key, y) for y in range(row.height)]
self._offset_cache[self._update_count] = y_offsets

return y_offsets

@property
Expand Down Expand Up @@ -1397,6 +1398,7 @@ def _update_dimensions(self, new_rows: Iterable[RowKey]) -> None:
# If there are rows that need to have their height computed, render them correctly
# so that we can cache this rendering for later.
if auto_height_rows:
self._offset_cache.clear()
render_cell = self._render_cell # This method renders & caches.
should_highlight = self._should_highlight
cursor_type = self.cursor_type
Expand Down Expand Up @@ -1451,6 +1453,9 @@ def _update_dimensions(self, new_rows: Iterable[RowKey]) -> None:
]
)

self._line_cache.clear()
self._styles_cache.clear()

data_cells_width = sum(
column.get_render_width(self) for column in self.columns.values()
)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading