We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Label.change event fires when its value did not change
Label.change
In fact the completion of handling the change event seems to re-trigger the change event
change
(I encountered this while trying to use a hidden Label as a workaround for State objects have no change event #2107)
State
Issue may be specific to the Label component, if I substitute a hidden Textbox the issue does not happen
Label
Textbox
import gradio as gr def set_label(val): print("set_label") return f"> {val}" def on_change(val): print(f"on_change: {val}") with gr.Blocks() as demo: inp = gr.Textbox(label="Set label") label = gr.Label("", visible=False) inp.submit(set_label, [inp], [label]) label.change(on_change, [label], None) demo.launch(debug=True)
The code above gets stuck in a loop
it seems like the change event re-triggers itself
n/a
gradio 3.32.0
annoying
The text was updated successfully, but these errors were encountered:
Thanks @anentropic - will take a look!
Sorry, something went wrong.
freddyaboulton
Successfully merging a pull request may close this issue.
Describe the bug
The
Label.change
event fires when its value did not changeIn fact the completion of handling the
change
event seems to re-trigger thechange
event(I encountered this while trying to use a hidden Label as a workaround for
State
objects have no change event #2107)Issue may be specific to the
Label
component, if I substitute a hiddenTextbox
the issue does not happenIs there an existing issue for this?
Reproduction
Screenshot
The code above gets stuck in a loop
it seems like the change event re-triggers itself
Logs
System Info
Severity
annoying
The text was updated successfully, but these errors were encountered: