Comments (2)
You have two options that come to mind:
- Use
mo.stop
to validate that there has been selection
table = mo.ui.table(...)
# in another cell
mo.stop(not table.value, mo.callout("Must select one value"))
- create a "controlled" ui element
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)
from marimo.
We could also add a min/max selection to the table as well.
from marimo.
Related Issues (20)
- Dark theme style issues HOT 1
- Special variable name "__" not treated as local
- Button click is not updating cell (but is updating others HOT 1
- Patched urllib does not seem to work outside of Pandas HOT 3
- Cell width editable size HOT 7
- LaTeX rendering HOT 3
- Sorting by column with mo.ui.table and mo.ui.dataframe does not include index
- Anywidget.send does not update the widget HOT 5
- collaborative forms
- Constraint incompatibility with awscli for marimo > 0.2.2 HOT 3
- marimo 0.6.14 no longer imports xdsl without error HOT 4
- Error on display of polars dataframe with array element type
- keras.utils.plot_model returns Expected string data HOT 2
- polars pyo3_runtime.PanicException makes notebook unresponsive HOT 2
- %reset magic
- mo.ui.table, allow disable selection for some rows. HOT 2
- mo.ui.table clicking anywhere in a pre-selected row (including highlighting) un-selects the row HOT 1
- crypto.randomUUID is not a function HOT 4
- Backslashes added to fstring inside `mo.md()` HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marimo.