Skip to content

Commit

Permalink
🐛 Textualize/textual#5488 workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
davep committed Jan 20, 2025
1 parent bbbaa44 commit 6949053
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/peplum/app/widgets/pep_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@

##############################################################################
# Textual imports.
from textual import on
from textual.app import ComposeResult
from textual.containers import Vertical, VerticalScroll
from textual.events import DescendantBlur, DescendantFocus
from textual.reactive import var
from textual.widgets import Label, OptionList

Expand Down Expand Up @@ -170,6 +172,13 @@ def compose(self) -> ComposeResult:
with Field("URL"):
yield URL(id="url")

@on(DescendantBlur)
@on(DescendantFocus)
def _textual_5488_workaround(self) -> None:
"""Workaround for https://github.com/Textualize/textual/issues/5488"""
for widget in self.query(List):
widget._refresh_lines()

def watch_pep(self) -> None:
"""React to the PEP being changed."""
with self.app.batch_update():
Expand Down

0 comments on commit 6949053

Please sign in to comment.