Add a method of selecting all selection options

This commit is contained in:
Dave Pearson
2023-05-23 10:20:00 +01:00
parent a2fc3fad43
commit 3ce04c814a

View File

@@ -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.