Skip to content

Proper handling of trigger=True "events" #949

Answered by lo5
Far0n asked this question in Q&A
Discussion options

You must be logged in to vote

The on/handle_on duo is merely a syntactic sugar for multiple if/elif.../else that one would normally do inside serve(), so the behavior where handle_on() calls exactly one handler is intentional. Explained here: https://wave.h2o.ai/docs/routing#reducing-boilerplate

The trigger simply means "submit everything when this field changes", and not "submit this field when it changes". Wave apps generally handle all available fields in aggregate, and not individually as in a traditional event-handling / callback style programming.

I'm curious why you'd want to know which textbox triggered it. I can suggest alternatives if I can understand your situation better.

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@Far0n
Comment options

@Far0n
Comment options

@lo5
Comment options

lo5 Aug 13, 2021
Maintainer

@Far0n
Comment options

Answer selected by Far0n
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants