mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
refactor(select): utilize add_options method (#5256)
This commit is contained in:
@@ -425,8 +425,7 @@ class Select(Generic[SelectType], Vertical, can_focus=True):
|
||||
|
||||
option_list = self.query_one(SelectOverlay)
|
||||
option_list.clear_options()
|
||||
for option in self._select_options:
|
||||
option_list.add_option(option)
|
||||
option_list.add_options(self._select_options)
|
||||
|
||||
def _init_selected_option(self, hint: SelectType | NoSelection = BLANK) -> None:
|
||||
"""Initialises the selected option for the `Select`."""
|
||||
|
||||
Reference in New Issue
Block a user