ui.update_task_button

ui.update_task_button(id, *, state=None, session=None)

Change the state of a task button on the client.

When a task button is clicked, it automatically changes to the "busy" state. This function can be used to change the state back to "ready" when the task is complete.

You can also use this function to change the state to "busy" manually, which will prevent the button from automatically resetting to "ready" after a click.

Parameters

id: str

An input id.

state: Optional[str] = None

The new state of the button. One of “ready”, “busy”, or a custom state name added via input_task_button.

session: Optional[Session] = None

A Session instance. If not provided, it is inferred via get_current_session.