From 2814e1f93cedda439b5e14c3864832b9846afebc Mon Sep 17 00:00:00 2001 From: Darren Burns Date: Mon, 16 Jan 2023 10:50:41 +0000 Subject: [PATCH] Documentation updates --- docs/widgets/data_table.md | 19 +++++++++++-------- src/textual/widgets/_data_table.py | 4 ---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/widgets/data_table.md b/docs/widgets/data_table.md index 7d5558a95..facbbddec 100644 --- a/docs/widgets/data_table.md +++ b/docs/widgets/data_table.md @@ -23,14 +23,17 @@ The example below populates a table with CSV data. ## Reactive Attributes -| Name | Type | Default | Description | -| --------------- | ------ | ------- | ---------------------------------- | -| `show_header` | `bool` | `True` | Show the table header | -| `fixed_rows` | `int` | `0` | Number of fixed rows | -| `fixed_columns` | `int` | `0` | Number of fixed columns | -| `zebra_stripes` | `bool` | `False` | Display alternating colors on rows | -| `header_height` | `int` | `1` | Height of header row | -| `show_cursor` | `bool` | `True` | Show a cell cursor | +| Name | Type | Default | Description | +|-----------------|---------|---------------|-------------------------------------------------------| +| `show_header` | `bool` | `True` | Show the table header | +| `fixed_rows` | `int` | `0` | Number of fixed rows (rows which do not scroll) | +| `fixed_columns` | `int` | `0` | Number of fixed columns (columns which do not scroll) | +| `zebra_stripes` | `bool` | `False` | Display alternating colors on rows | +| `header_height` | `int` | `1` | Height of header row | +| `show_cursor` | `bool` | `True` | Show the cursor | +| `cursor_type` | `str` | `"cell"` | One of `"cell"`, `"row"`, `"column"`, or `"none"` | +| `cursor_cell` | `Coord` | `Coord(0, 0)` | The cell the cursor is on | +| `hover_cell` | `Coord` | `Coord(0, 0)` | The cell currently hovered over by the mouse cursor | ## See Also diff --git a/src/textual/widgets/_data_table.py b/src/textual/widgets/_data_table.py index 0d4fbf4c7..d36651f3d 100644 --- a/src/textual/widgets/_data_table.py +++ b/src/textual/widgets/_data_table.py @@ -467,10 +467,6 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True): self._new_rows.add(row_index) self._require_update_dimensions = True - - # TODO - I want to set this here, but that will trigger the validator - # again which is pointless - since I know the value is valid... - # Don't think we have a means of doing this yet. self.cursor_cell = self.cursor_cell self.check_idle()