Fix clearing an OptionList

See #2557, credit to Will:

  https://github.com/Textualize/textual/issues/2557#issuecomment-1546883815
This commit is contained in:
Dave Pearson
2023-05-15 11:30:26 +01:00
parent 83618db642
commit aff9bcdf93

View File

@@ -631,7 +631,7 @@ class OptionList(ScrollView, can_focus=True):
self.highlighted = None
self._mouse_hovering_over = None
self.virtual_size = Size(self.scrollable_content_region.width, 0)
self.refresh()
self._request_content_tracking_refresh()
return self
def _set_option_disabled(self, index: int, disabled: bool) -> Self: