Add a TODO comment to the effect that this is a temp fix

This commit is contained in:
Dave Pearson
2023-05-16 13:38:08 +01:00
parent f12aeb00d2
commit 32fa259c94

View File

@@ -630,6 +630,13 @@ class OptionList(ScrollView, can_focus=True):
self.highlighted = None self.highlighted = None
self._mouse_hovering_over = None self._mouse_hovering_over = None
self.virtual_size = Size(self.scrollable_content_region.width, 0) 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() self._request_content_tracking_refresh()
return self return self