Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -136,26 +136,16 @@ async def main(page: ft.Page):
|
|
136 |
|
137 |
query_list = books_list
|
138 |
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
if book in query_feild.value:
|
143 |
-
list_items_list[book] = (ListTile(
|
144 |
-
title=Text(book),
|
145 |
leading=Icon(icons.ARROW_RIGHT_SHARP),
|
146 |
-
on_click=
|
147 |
-
))
|
148 |
|
|
|
|
|
|
|
149 |
|
150 |
-
# list_items = {
|
151 |
-
# name: ListTile(
|
152 |
-
# title=Text(name),
|
153 |
-
# leading=Icon(icons.ARROW_RIGHT_SHARP),
|
154 |
-
# on_click=lambda e, name=name: printer(e, name) # Capture current value of name
|
155 |
-
# )
|
156 |
-
# for name in query_list
|
157 |
-
# }
|
158 |
-
|
159 |
str_lower = normalize_arabic(e.control.value)
|
160 |
listview.controls = [
|
161 |
list_items_list.get(n) for n in query_list if str_lower in normalize_arabic(n)
|
|
|
136 |
|
137 |
query_list = books_list
|
138 |
|
139 |
+
list_items = {
|
140 |
+
name: ListTile(
|
141 |
+
title=Text(name),
|
|
|
|
|
|
|
142 |
leading=Icon(icons.ARROW_RIGHT_SHARP),
|
143 |
+
on_click=lambda e, name=name: asyncio.create_task(handle_list_item_click(e, name))
|
|
|
144 |
|
145 |
+
)
|
146 |
+
for name in query_list
|
147 |
+
}
|
148 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
149 |
str_lower = normalize_arabic(e.control.value)
|
150 |
listview.controls = [
|
151 |
list_items_list.get(n) for n in query_list if str_lower in normalize_arabic(n)
|