From f2fc1cc81add4620e5c1e9a2b81ad8c6b6e3224c Mon Sep 17 00:00:00 2001 From: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:38:33 +0100 Subject: [PATCH] docs: more explicit pharsing for gr.on (#7170) Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> --- .../03_building-with-blocks/01_blocks-and-event-listeners.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/03_building-with-blocks/01_blocks-and-event-listeners.md b/guides/03_building-with-blocks/01_blocks-and-event-listeners.md index 772e7abc0a..1b83451c1d 100644 --- a/guides/03_building-with-blocks/01_blocks-and-event-listeners.md +++ b/guides/03_building-with-blocks/01_blocks-and-event-listeners.md @@ -192,9 +192,9 @@ You can use decorator syntax as well: $code_on_listener_decorator -You can use `gr.on` to create "live" events by binding to the change event of all components. If you do not specify any triggers, the function will automatically bind to the change event of all input components. +You can use `gr.on` to create "live" events by binding to the `change` event of components that implement it. If you do not specify any triggers, the function will automatically bind to all `change` event of all input components that include a `change` event (for example `gr.Textbox` has a `change` event whereas `gr.Button` does not). $code_on_listener_live $demo_on_listener_live -You can follow `gr.on` with `.then`, just like any regular event listener. This handy method should save you from having to write a lot of repetitive code! \ No newline at end of file +You can follow `gr.on` with `.then`, just like any regular event listener. This handy method should save you from having to write a lot of repetitive code!