Open Eloitor opened 4 days ago
You have two options that come to mind:
mo.stop
to validate that there has been selectiontable = mo.ui.table(...)
# in another cell
mo.stop(not table.value, mo.callout("Must select one value"))
get_state, set_state = mo.state()
def handle_selection_with_no_deselect():
...
# in another cell
table = mo.ui.table(value=get_state(), on_change=handle_selection_with_no_deselect)
We could also add a min/max selection to the table as well.
Description
I have a table with possible parameters for a calculation. Selecting a row sets the parameters for the rest of the notebook. The problem is that if no row is selected I get the error:
IndexError: list index out of range
.Suggested solution
Add an option for the rows of a table to behave as radio buttons instead of check boxes.
Alternative
No response
Additional context
No response