mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Ensure _options attribute is assigned in Select constructor (#2690)
* Ensure _options attribute is assigned in Select constructor * Update CHANGELOG.md --------- Co-authored-by: Will McGugan <willmcgugan@gmail.com>
This commit is contained in:
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
- Fixed zero division error https://github.com/Textualize/textual/issues/2673
|
- Fixed zero division error https://github.com/Textualize/textual/issues/2673
|
||||||
- Fix `scroll_to_center` when there were nested layers out of view (Compositor full_map not populated fully) https://github.com/Textualize/textual/pull/2684
|
- Fix `scroll_to_center` when there were nested layers out of view (Compositor full_map not populated fully) https://github.com/Textualize/textual/pull/2684
|
||||||
|
- Fix crash when `Select` widget value attribute was set in `compose` https://github.com/Textualize/textual/pull/2690
|
||||||
- Issue with computing progress in workers https://github.com/Textualize/textual/pull/2686
|
- Issue with computing progress in workers https://github.com/Textualize/textual/pull/2686
|
||||||
- Issues with `switch_screen` not updating the results callback appropriately https://github.com/Textualize/textual/issues/2650
|
- Issues with `switch_screen` not updating the results callback appropriately https://github.com/Textualize/textual/issues/2650
|
||||||
|
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ class Select(Generic[SelectType], Vertical, can_focus=True):
|
|||||||
self.prompt = prompt
|
self.prompt = prompt
|
||||||
self._initial_options = list(options)
|
self._initial_options = list(options)
|
||||||
self._value: SelectType | None = value
|
self._value: SelectType | None = value
|
||||||
|
self._options = options
|
||||||
|
|
||||||
def set_options(self, options: Iterable[tuple[RenderableType, SelectType]]) -> None:
|
def set_options(self, options: Iterable[tuple[RenderableType, SelectType]]) -> None:
|
||||||
"""Set the options for the Select.
|
"""Set the options for the Select.
|
||||||
|
|||||||
Reference in New Issue
Block a user