Skip to content

Commit e9be189

Browse files
authored
Merge pull request #5795 from rephorm/fork
Refresh layout of option lists on add.
2 parents 10f1530 + 1cd868f commit e9be189

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=self.styles.auto_dimensions)
376377
self._update_lines()
377378
return self
378379

0 commit comments

Comments
 (0)