Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit 4d35dc2

Browse files
committed
fix get_data_path prop annotation
This cannot be an EventHandler, it has to be some type of FunctionVar that can be called on the frontend.
1 parent fc2c644 commit 4d35dc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

custom_components/reflex_ag_grid/ag_grid.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class AgGrid(rx.Component):
305305
suppress_row_click_selection: rx.Var[bool] = rx.Var.create(False)
306306

307307
# Event handler for getting the data path
308-
get_data_path: rx.EventHandler[lambda e0: [e0]]
308+
get_data_path: rx.vars.FunctionVar[Any]
309309

310310
# Variable to allow unbalanced groups
311311
group_allow_unbalanced: rx.Var[bool] = rx.Var.create(False)
@@ -451,8 +451,8 @@ def create(
451451

452452
# handle hierarchical data
453453
if data_path_key is not None:
454-
props["get_data_path"] = rx.Var(f"(data) => data.{data_path_key}").to(
455-
rx.EventChain
454+
props["get_data_path"] = rx.vars.FunctionStringVar(
455+
f"(data) => data.{data_path_key}"
456456
)
457457

458458
if is_server_side_group_key is not None:

0 commit comments

Comments
 (0)