mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a docstring to action_toggle_node
I want to add docstrings to the actions I'm adding as part of #1700, so with this in mind I'm going to add docstrings to all the actions.
This commit is contained in:
@@ -1015,6 +1015,13 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
|
||||
self._toggle_node(line.path[-1])
|
||||
|
||||
def action_select_cursor(self) -> None:
|
||||
"""Cause a select event for the target node.
|
||||
|
||||
Note:
|
||||
If `auto_expand` is `True` use of this action on a non-leaf node
|
||||
will cause both an expand/collapse event to occour, as well as a
|
||||
selected event.
|
||||
"""
|
||||
try:
|
||||
line = self._tree_lines[self.cursor_line]
|
||||
except IndexError:
|
||||
|
||||
Reference in New Issue
Block a user