big update new dashboard and import export

This commit is contained in:
2026-04-10 00:39:35 +05:00
parent 4013701441
commit e2fb4ddb2a
19 changed files with 1324 additions and 159 deletions

View File

@@ -30,7 +30,7 @@ class colors:
class SearchableDropdown(ft.Container):
"""Выпадающий список с поисковой строкой."""
def __init__(self, label: str = "", hint_text: str = "", options=None, on_select=None):
def __init__(self, label: str = "", hint_text: str = "", options=None, on_select=None, width: int | None = None):
self._label_str = label
self._hint_str = hint_text
self._options: list = options or []
@@ -69,7 +69,7 @@ class SearchableDropdown(ft.Container):
padding=ft.padding.symmetric(horizontal=s(12), vertical=s(10)),
on_click=self._open_dialog,
ink=True,
expand=True,
width=width or s(220),
)
@property
@@ -90,8 +90,11 @@ class SearchableDropdown(ft.Container):
self._value_text.color = colors.text_primary
self._value_text.italic = False
break
if self.page:
self.update()
try:
if self.page:
self.update()
except RuntimeError:
pass
@property
def options(self):