mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Merge branch 'main' of github.com:willmcgugan/textual into datatable-cell-keys
This commit is contained in:
@@ -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 )
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -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"])
|
||||||
|
|||||||
Reference in New Issue
Block a user