diff --git a/src/textual/widgets/_data_table.py b/src/textual/widgets/_data_table.py
index 32fab94cef..c6c31be50d 100644
--- a/src/textual/widgets/_data_table.py
+++ b/src/textual/widgets/_data_table.py
@@ -330,6 +330,9 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
)
"""The coordinate of the `DataTable` that is being hovered."""
+ def watch_cell_padding(self) -> None:
+ self._clear_caches()
+
class CellHighlighted(Message):
"""Posted when the cursor moves to highlight a new cell.
@@ -1052,6 +1055,9 @@ def watch_fixed_columns(self) -> None:
def watch_zebra_stripes(self) -> None:
self._clear_caches()
+ def watch_cell_padding(self) -> None:
+ self._clear_caches()
+
def watch_hover_coordinate(self, old: Coordinate, value: Coordinate) -> None:
self.refresh_coordinate(old)
self.refresh_coordinate(value)
diff --git a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
index ac7d6c80d6..496d5a5319 100644
--- a/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
+++ b/tests/snapshot_tests/__snapshots__/test_snapshots.ambr
@@ -14159,6 +14159,164 @@
'''
# ---
+# name: test_datatable_change_cell_padding
+ '''
+
+
+ '''
+# ---
# name: test_datatable_column_cursor_render
'''