Add a method of getting at the selected values

This commit is contained in:
Dave Pearson
2023-05-22 11:40:03 +01:00
parent 6bc2a6ebd2
commit 424c30fcf1

View File

@@ -182,6 +182,11 @@ class SelectionList(Generic[SelectionType], OptionList):
)
self._selected: dict[SelectionType, None] = {}
@property
def selected(self) -> list[SelectionType]:
"""The selected values."""
return list(self._selected.keys())
def _make_selection(
self,
selection: tuple[TextType, SelectionType]