EventSpec
reflex_base.event.EventSpec
An event specification.
Whereas an Event object is passed during runtime, a spec is used during compile time to outline the structure of an event.
Fields
event_actions
dict[str, bool | int]Default: {}
Whether to preventDefault or stopPropagation on the event.
handler
EventHandlerDefault: None
The event handler.
client_handler_name
strDefault: ''
The handler on the client to process event.
args
tuple[tuple[Var, Var], Ellipsis]Default: ()
The arguments to pass to the function.
Methods
with_args
with_args(args: tuple[tuple[Var, Var], Ellipsis]) -> EventSpecCopy the event spec, with updated args.
Parameters
args
The new args to pass to the function.
Returns
A copy of the event spec, with the new args.
add_args
add_args(*args: Var) -> EventSpecAdd arguments to the event spec.
Parameters
*args
The arguments to add positionally.
Returns
The event spec with the new arguments.
Raises
EventHandlerTypeError
If the arguments are invalid.