You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However this is a long-standing problem in Reflex in that arguments passed to event handlers are always the bare un-JSON'd type, rather than the preferred model type.
There is some provision for casting number-type arguments to actual int/float before passing them through to the event handler, but this logic does not apply for dict types that are annotated with another, specific type.
The text was updated successfully, but these errors were encountered:
Describe the bug
Event handlers always seem to get a
dict
even when the user expects to get a particular type.To Reproduce
Expected behavior
The argument received by the
set_amigo_actual
event handler should be anAmigo
, not adict
.Specifics (please complete the following information):
Additional context
From this forum thread https://forum.reflex.dev/t/understanding-state-types/488
However this is a long-standing problem in Reflex in that arguments passed to event handlers are always the bare un-JSON'd type, rather than the preferred model type.
There is some provision for casting number-type arguments to actual int/float before passing them through to the event handler, but this logic does not apply for dict types that are annotated with another, specific type.
The text was updated successfully, but these errors were encountered: