refactor(select): utilize add_options method (#5256)

This commit is contained in:
TomJGooding
2024-11-27 10:26:26 +00:00
committed by GitHub
parent 9f19f5fddb
commit e52692a16c

View File

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