Skip to content

Commit 2213c7d

Browse files
committed
Fix header height reactive change not clearing caches
1 parent 9195904 commit 2213c7d

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/textual/widgets/_data_table.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,8 @@
3535
CellCacheKey: TypeAlias = (
3636
"tuple[RowKey, ColumnKey, Style, bool, bool, bool, int, PseudoClasses]"
3737
)
38-
LineCacheKey: TypeAlias = (
39-
"tuple[int, int, int, int, Coordinate, Coordinate, Style, CursorType, bool, int, PseudoClasses]"
40-
)
41-
RowCacheKey: TypeAlias = (
42-
"tuple[RowKey, int, Style, Coordinate, Coordinate, CursorType, bool, bool, int, PseudoClasses]"
43-
)
38+
LineCacheKey: TypeAlias = "tuple[int, int, int, int, Coordinate, Coordinate, Style, CursorType, bool, int, PseudoClasses]"
39+
RowCacheKey: TypeAlias = "tuple[RowKey, int, Style, Coordinate, Coordinate, CursorType, bool, bool, int, PseudoClasses]"
4440
CursorType = Literal["cell", "row", "column", "none"]
4541
"""The valid types of cursors for [`DataTable.cursor_type`][textual.widgets.DataTable.cursor_type]."""
4642
CellType = TypeVar("CellType")
@@ -1160,6 +1156,9 @@ def watch_fixed_columns(self) -> None:
11601156
def watch_zebra_stripes(self) -> None:
11611157
self._clear_caches()
11621158

1159+
def watch_header_height(self) -> None:
1160+
self._clear_caches()
1161+
11631162
def validate_cell_padding(self, cell_padding: int) -> int:
11641163
return max(cell_padding, 0)
11651164

0 commit comments

Comments
 (0)