Skip to content

Commit

Permalink
Test cell_padding assignment refreshes data table.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigogiraoserrao committed Oct 3, 2023
1 parent b84334c commit bbe5c85
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/textual/widgets/_data_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit bbe5c85

Please sign in to comment.