Merge branch 'main' of github.com:willmcgugan/textual into datatable-cell-keys

This commit is contained in:
Darren Burns
2023-02-08 14:22:43 +00:00
2 changed files with 2 additions and 2 deletions

View File

@@ -288,7 +288,7 @@ So, thanks to this bit of code in my `Activity` widget...
parent.move_child( parent.move_child(
self, before=parent.children.index( self ) - 1 self, before=parent.children.index( self ) - 1
) )
self.post_message_no_wait( self.Moved( self ) ) self.emit_no_wait( self.Moved( self ) )
self.scroll_visible( top=True ) self.scroll_visible( top=True )
``` ```

View File

@@ -1498,7 +1498,7 @@ class DataTable(ScrollView, Generic[CellType], can_focus=True):
def on_click(self, event: events.Click) -> None: def on_click(self, event: events.Click) -> None:
self._set_hover_cursor(True) self._set_hover_cursor(True)
if self.show_cursor and self.cursor_type != "none": if self.show_cursor and self.cursor_type != "none":
# Only emit selection events if there is a visible row/col/cell cursor. # Only post selection events if there is a visible row/col/cell cursor.
meta = self.get_style_at(event.x, event.y).meta meta = self.get_style_at(event.x, event.y).meta
if meta: if meta:
self.cursor_coordinate = Coordinate(meta["row"], meta["column"]) self.cursor_coordinate = Coordinate(meta["row"], meta["column"])