Does "debounce" fire the event first, then pause?

What is the behavior associated with the "debounce" parameter? Does it:

  1. Immediately fire the event, pause the specified milliseconds, then fire it again...or

  2. Pause the specified milliseconds, then fire the event, then pause?

If #1, how do you simply delay the firing of an event for a time?

Hey @bchatham! I just tested on my end and it looks like the Event Handler's "debounce" parameter will wait the number of milliseconds specified before triggering the target query (so #2). Does this sound about similar to the behavior you're seeing on your end?

Thanks -- how are you visualizing/tracking the firing of events to see what the timing looks like?

I just tested with a dummy JS query that shows a notification when it runs. Will upload a GIF of how I watched the query wait 3 seconds (3000 ms), then run!


1 Like

In general (for existing queries) and for display purposes, you have a few options:

1. You can add an event handler to the query itself to "Run script" that fires confetti or shows a notification using:


utils.showNotification({title:"success", description: "query7 just ran"})

2. For queries set to run when manually triggered, you can add a success message in the "Response" tab: