mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a method of selecting all selection options
This commit is contained in:
@@ -272,6 +272,10 @@ class SelectionList(Generic[SelectionType], OptionList):
|
|||||||
self.refresh()
|
self.refresh()
|
||||||
return self
|
return self
|
||||||
|
|
||||||
|
def select_all(self) -> Self:
|
||||||
|
"""Select all items."""
|
||||||
|
return self._apply_to_all(self._select)
|
||||||
|
|
||||||
def _deselect(self, value: SelectionType) -> None:
|
def _deselect(self, value: SelectionType) -> None:
|
||||||
"""Mark the given selection as not selected.
|
"""Mark the given selection as not selected.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user