mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Refresh input when placeholder reactive is updated
This commit is contained in:
@@ -176,7 +176,7 @@ class Input(Widget, can_focus=True):
|
||||
input_scroll_offset = reactive(0)
|
||||
cursor_position = reactive(0)
|
||||
view_position = reactive(0)
|
||||
placeholder = reactive("")
|
||||
placeholder = reactive("", init=False)
|
||||
complete = reactive("")
|
||||
width = reactive(1)
|
||||
_cursor_visible = reactive(True)
|
||||
@@ -394,6 +394,9 @@ class Input(Widget, can_focus=True):
|
||||
self._cursor_visible = True
|
||||
self._blink_timer.pause()
|
||||
|
||||
def _watch_placeholder(self) -> None:
|
||||
self.refresh()
|
||||
|
||||
@property
|
||||
def cursor_screen_offset(self) -> Offset:
|
||||
"""The offset of the cursor of this input in screen-space. (x, y)/(column, row)"""
|
||||
|
||||
Reference in New Issue
Block a user