mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a docstring to action_toggle_node
This commit is contained in:
@@ -1007,6 +1007,7 @@ class Tree(Generic[TreeDataType], ScrollView, can_focus=True):
|
|||||||
self.scroll_to_line(self.cursor_line)
|
self.scroll_to_line(self.cursor_line)
|
||||||
|
|
||||||
def action_toggle_node(self) -> None:
|
def action_toggle_node(self) -> None:
|
||||||
|
"""Toggle the expanded state of the target node."""
|
||||||
try:
|
try:
|
||||||
line = self._tree_lines[self.cursor_line]
|
line = self._tree_lines[self.cursor_line]
|
||||||
except IndexError:
|
except IndexError:
|
||||||
|
|||||||
Reference in New Issue
Block a user