flet
flet copied to clipboard
DatePicker control freezing Flet app after upgrading to v0.21.1
Description
After upgrading to flet v0.21.1, the DatePicker control now freezes my app whenever I try to switch from a page that doesn't contain a DatePicker to a page that contains the DatePicker.
Code example to reproduce the issue:
self.date_picker = DatePicker(
on_change = self.setDateFieldValue,
first_date=datetime.datetime(2020, 10, 1),
last_date=datetime.datetime(2030, 10, 1),
)
Changing the on_change method to an empty function, like lambda _ : print() doesn't solve the problem, so the method is irrelevant. Even an empty DatePicker as in self.date_picker = DatePicker() doesn't change anything. Only removing this control solves the problem.
Describe the results you received:
The app is frozen. Clicking in any buttons won't cause anything. App won't switch pages when clicking on navigation buttons.
Describe the results you expected:
Page in which the DatePicker is located should appear on the screen.
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet):
Name: flet
Version: 0.21.1
Summary: Flet for Python - easily build interactive multi-platform apps in Python
Home-page:
Author: Appveyor Systems Inc.
Author-email: [email protected]
License: Apache-2.0
Requires: cookiecutter, fastapi, flet-runtime, packaging, qrcode, uvicorn, watchdog
Required-by:
Operating system: Windows
Additional information: rolling back to version v0.20.2 fixes the problem. Version v0.21.0 also has the same problem.
Please build a runnable code sample so we can test and investigate.