I want a column holding a control to collapse when a button is clicked.
with gr.Blocks() as demo:
with gr.Row():
with gr.Column(scale=1, min_width=0):
html_element = gr.HTML()
with gr.Column(scale=0, min_width=20):
btn_toggle = gr.Button()
with gr.Column(scale=2):
usr_txt = gr.Textbox()
btn_toggle.click(handle_toggle, btn_toggle, html_element)
I'm currently struggling with implementing the click event for the 'btn_toggle' button. The goal is to have the first column collapse when this button is clicked. Any guidance would be greatly appreciated.