From 66bd8cefd3fe2191f3d1ad472445fce518e0e3ff Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Tue, 4 Feb 2025 15:10:00 -0800 Subject: [PATCH] fix event handlers (#298) --- ag_grid_finance/.gitignore | 1 + azure_auth/.gitignore | 1 + basic_crud/.gitignore | 1 + chat_v2/.gitignore | 1 + chat_v2/requirements.txt | 12 ++++++------ clock/.gitignore | 1 + counter/.gitignore | 1 + customer_data_app/.gitignore | 1 + dalle/.gitignore | 1 + data_visualisation/.gitignore | 1 + flux-fast/.gitignore | 1 + github-stats/.gitignore | 1 + json-tree/.gitignore | 6 ++++++ linkinbio/.gitignore | 1 + local-component/.gitignore | 2 ++ lorem-stream/.gitignore | 1 + nba-proxy/.gitignore | 1 + nba/.gitignore | 1 + overkey/.gitignore | 1 + quiz/.gitignore | 1 + reflexle/.gitignore | 1 + sales/.gitignore | 1 + sales/sales/backend/backend.py | 6 +++++- snakegame/.gitignore | 1 + todo/.gitignore | 1 + translator/.gitignore | 1 + traversal/.gitignore | 1 + twitter/.gitignore | 1 + upload/.gitignore | 1 + 29 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 json-tree/.gitignore diff --git a/ag_grid_finance/.gitignore b/ag_grid_finance/.gitignore index 139ed98a..b37e3628 100644 --- a/ag_grid_finance/.gitignore +++ b/ag_grid_finance/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/azure_auth/.gitignore b/azure_auth/.gitignore index 139ed98a..b37e3628 100644 --- a/azure_auth/.gitignore +++ b/azure_auth/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/basic_crud/.gitignore b/basic_crud/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/basic_crud/.gitignore +++ b/basic_crud/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/chat_v2/.gitignore b/chat_v2/.gitignore index 954fa974..bd5d4da2 100644 --- a/chat_v2/.gitignore +++ b/chat_v2/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .DS_Store diff --git a/chat_v2/requirements.txt b/chat_v2/requirements.txt index c41470fc..63d5f634 100644 --- a/chat_v2/requirements.txt +++ b/chat_v2/requirements.txt @@ -1,8 +1,8 @@ -openai==1.55.3 -openinference-instrumentation==0.1.18 -opentelemetry-exporter-otlp==1.27.0 -pytz==2024.2 -together==1.3.1 -uv==0.4.22 +openai>=1.55.3 +openinference-instrumentation>=0.1.18 +opentelemetry-exporter-otlp>=1.27.0 +pytz>=2024.2 +together>=1.3.1 +uv>=0.4.22 reflex>=0.6.2.post1 diff --git a/clock/.gitignore b/clock/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/clock/.gitignore +++ b/clock/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/counter/.gitignore b/counter/.gitignore index e4170665..44a66822 100644 --- a/counter/.gitignore +++ b/counter/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/customer_data_app/.gitignore b/customer_data_app/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/customer_data_app/.gitignore +++ b/customer_data_app/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/dalle/.gitignore b/dalle/.gitignore index 939e3652..2520b6be 100644 --- a/dalle/.gitignore +++ b/dalle/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/data_visualisation/.gitignore b/data_visualisation/.gitignore index f9dc917a..3518c68c 100644 --- a/data_visualisation/.gitignore +++ b/data_visualisation/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/flux-fast/.gitignore b/flux-fast/.gitignore index 139ed98a..b37e3628 100644 --- a/flux-fast/.gitignore +++ b/flux-fast/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/github-stats/.gitignore b/github-stats/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/github-stats/.gitignore +++ b/github-stats/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/json-tree/.gitignore b/json-tree/.gitignore new file mode 100644 index 00000000..e4236064 --- /dev/null +++ b/json-tree/.gitignore @@ -0,0 +1,6 @@ +assets/external/ +.web +*.py[cod] +*.db +__pycache__/ +.states diff --git a/linkinbio/.gitignore b/linkinbio/.gitignore index e0c3f1ef..54192089 100644 --- a/linkinbio/.gitignore +++ b/linkinbio/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .env diff --git a/local-component/.gitignore b/local-component/.gitignore index 876950f1..d3bf863e 100644 --- a/local-component/.gitignore +++ b/local-component/.gitignore @@ -1,3 +1,5 @@ +.states +assets/external/ *.db *.py[cod] .web diff --git a/lorem-stream/.gitignore b/lorem-stream/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/lorem-stream/.gitignore +++ b/lorem-stream/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/nba-proxy/.gitignore b/nba-proxy/.gitignore index 1b53023b..f5514817 100644 --- a/nba-proxy/.gitignore +++ b/nba-proxy/.gitignore @@ -1,3 +1,4 @@ +.states .web __pycache__/ *.db diff --git a/nba/.gitignore b/nba/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/nba/.gitignore +++ b/nba/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/overkey/.gitignore b/overkey/.gitignore index 139ed98a..b37e3628 100644 --- a/overkey/.gitignore +++ b/overkey/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/quiz/.gitignore b/quiz/.gitignore index 939e3652..2520b6be 100644 --- a/quiz/.gitignore +++ b/quiz/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/reflexle/.gitignore b/reflexle/.gitignore index 139ed98a..b37e3628 100644 --- a/reflexle/.gitignore +++ b/reflexle/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/sales/.gitignore b/sales/.gitignore index 939e3652..2520b6be 100644 --- a/sales/.gitignore +++ b/sales/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/sales/sales/backend/backend.py b/sales/sales/backend/backend.py index f3a08e40..f7930832 100644 --- a/sales/sales/backend/backend.py +++ b/sales/sales/backend/backend.py @@ -66,11 +66,15 @@ class State(rx.State): email_content_data: str = "Click 'Generate Email' to generate a personalized sales email." gen_response = False tone: str = "😊 Formal" - length: str = "1000" + length: int = 1000 search_value: str = "" sort_value: str = "" sort_reverse: bool = False + @rx.event + def set_length(self, value: list[int | float]): + self.length = int(value[0]) + def load_entries(self) -> list[Customer]: """Get all users from the database.""" with rx.session() as session: diff --git a/snakegame/.gitignore b/snakegame/.gitignore index e4170665..44a66822 100644 --- a/snakegame/.gitignore +++ b/snakegame/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/todo/.gitignore b/todo/.gitignore index e4170665..44a66822 100644 --- a/todo/.gitignore +++ b/todo/.gitignore @@ -1,3 +1,4 @@ +.states *.db *.py[cod] .web diff --git a/translator/.gitignore b/translator/.gitignore index 939e3652..2520b6be 100644 --- a/translator/.gitignore +++ b/translator/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/traversal/.gitignore b/traversal/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/traversal/.gitignore +++ b/traversal/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/twitter/.gitignore b/twitter/.gitignore index 84a3ecc5..ce6ae606 100644 --- a/twitter/.gitignore +++ b/twitter/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod] diff --git a/upload/.gitignore b/upload/.gitignore index 939e3652..2520b6be 100644 --- a/upload/.gitignore +++ b/upload/.gitignore @@ -1,3 +1,4 @@ +.states assets/external/ *.db *.py[cod]