Skip to content

Commit 0dc58bd

Browse files
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 <[email protected]>
1 parent 149c39c commit 0dc58bd

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1212

1313
- Fixed zero division error https://github.com/Textualize/textual/issues/2673
1414
- 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
15+
- Fix crash when `Select` widget value attribute was set in `compose` https://github.com/Textualize/textual/pull/2690
1516
- Issue with computing progress in workers https://github.com/Textualize/textual/pull/2686
1617
- Issues with `switch_screen` not updating the results callback appropriately https://github.com/Textualize/textual/issues/2650
1718

src/textual/widgets/_select.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ def __init__(
273273
self.prompt = prompt
274274
self._initial_options = list(options)
275275
self._value: SelectType | None = value
276+
self._options = options
276277

277278
def set_options(self, options: Iterable[tuple[RenderableType, SelectType]]) -> None:
278279
"""Set the options for the Select.

0 commit comments

Comments
 (0)