Skip to content

Commit 2648f82

Browse files
author
=
committed
Refresh layout of option lists on add.
Ensures options added to an empty list after mount are displayed.
1 parent d50b353 commit 2648f82

File tree

4 files changed

+77
-63
lines changed

4 files changed

+77
-63
lines changed

src/textual/widgets/_option_list.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ def add_options(self, new_options: Iterable[OptionListContent]) -> Self:
373373
self._id_to_option[option._id] = option
374374
add_option(option)
375375
if self.is_mounted:
376+
self.refresh(layout=True)
376377
self._update_lines()
377378
return self
378379

0 commit comments

Comments
 (0)