From b0a321d5dd97bc016ecab4d4f7d12f610a77e5cf Mon Sep 17 00:00:00 2001 From: Christoph Trappe Date: Fri, 5 Nov 2021 16:29:41 +0100 Subject: [PATCH] Potential patch of issues in commit 4941ddc --- nicegui/elements/value_element.py | 2 +- nicegui/events.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nicegui/elements/value_element.py b/nicegui/elements/value_element.py index 1171a0d8d..a775b62c5 100644 --- a/nicegui/elements/value_element.py +++ b/nicegui/elements/value_element.py @@ -25,7 +25,7 @@ def value_to_view(self, value): def handle_change(self, msg): self.value = msg['value'] - handle_event(self.change_handler, ValueChangeEventArguments(sender=self, value=self.value)) + handle_event(self.change_handler, ValueChangeEventArguments(sender=self, value=self.value), update_view=True) def bind_value_to(self, target_object, target_name, *, forward=lambda x: x): bind_to(self, 'value', target_object, target_name, forward=forward) diff --git a/nicegui/events.py b/nicegui/events.py index 87f69a1fa..33c6e23be 100644 --- a/nicegui/events.py +++ b/nicegui/events.py @@ -206,7 +206,7 @@ async def async_handler(): if asyncio.iscoroutinefunction(handler): await call if update_view: - await arguments.sender.parent_view.update() + await arguments.sender.page.update() except Exception: traceback.print_exc() asyncio.get_event_loop().create_task(async_handler())