From 32fa259c94261dab70337314c2d55f406e919973 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Tue, 16 May 2023 13:38:08 +0100 Subject: [PATCH] Add a TODO comment to the effect that this is a temp fix --- src/textual/widgets/_option_list.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/textual/widgets/_option_list.py b/src/textual/widgets/_option_list.py index 5b4a39b48..dfe530543 100644 --- a/src/textual/widgets/_option_list.py +++ b/src/textual/widgets/_option_list.py @@ -630,6 +630,13 @@ class OptionList(ScrollView, can_focus=True): self.highlighted = None self._mouse_hovering_over = None self.virtual_size = Size(self.scrollable_content_region.width, 0) + # TODO: See https://github.com/Textualize/textual/issues/2582 -- it + # should not be necessary to do this like this here; ideally here in + # clear_options it would be a forced refresh, and also in a + # `on_show` it would be the same (which, I think, would actually + # solve the problem we're seeing). But, until such a time as we get + # to the bottom of 2582... this seems to delay the refresh enough + # that things fall into place. self._request_content_tracking_refresh() return self