mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a method for toggling all options
This commit is contained in:
@@ -331,6 +331,10 @@ class SelectionList(Generic[SelectionType], OptionList):
|
||||
self.refresh()
|
||||
return self
|
||||
|
||||
def toggle_all(self) -> Self:
|
||||
"""Toggle all items."""
|
||||
return self._apply_to_all(self._toggle)
|
||||
|
||||
def _make_selection(
|
||||
self,
|
||||
selection: tuple[TextType, SelectionType]
|
||||
|
||||
Reference in New Issue
Block a user