Skip to content

Commit 1cd868f

Browse files
author
=
committed
Skip relayout if auto_dimensions are off.
1 parent 2648f82 commit 1cd868f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/textual/widgets/_option_list.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +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)
376+
self.refresh(layout=self.styles.auto_dimensions)
377377
self._update_lines()
378378
return self
379379

0 commit comments

Comments
 (0)