Get help from the marimo community

Home
Members
john_helt
j
john_helt
Offline, last seen 2 days ago
Joined November 25, 2024
Is there a way to format tables so that the width of different columns can be adjusted?
7 comments
M
j
What's the best way to handle race conditions? For instance, if I have a component A that B depends on, but C depends on A and a state that is set in B. How can I ensure that B is updated before C is updated, since the state update seems to hide reactivity
5 comments
A
j
I often get asked if Marimo can do a wizard style UI to guide the user through the workflow. I'm thinking the closest it can do is https://docs.marimo.io/api/layouts/carousel.html. But in order to be a true wizard, I would like to prevent the user from moving on until a certain task has been completed (fill in form, press button etc.). Could you add this type of logic to the component?
1 comment
M
I want to give a hint to the user, that they need to press a submit button, if they have made changes to some parts of the inputs. To do this, I want to nudge them by changing the color of the button to red. I tried with callout, but it seems a bit excessive as it just places a large box around my element. Instead I want to make it more subtle, but still visibly different from the standard button color
1 comment
M
Not sure if this is a bug, or a feature, but suddenly tables show the datatype below the header of each column. This is also the case on the example in the documentation. Is there a way to disable this?
1 comment
M
I'm wondering if there's a way to pre-select a table row, similarly to that of a dropdown or multiselect component?
2 comments
j
A
I find it unclear from the documentation, why I should use a marimo dictionary, and not just a python dict to hold UI elements. What is the fundamental difference, and when should you use one, and not the other, and vice verse?
5 comments
A
e
j
I have a long chained function call, which needs to call some async function to fetch data from a database. I was thinking I could use asyncio to get the running loop, and then run the function inside that loop using "run_until_complete", but I just get an runtimeerror "this event loop is already running". How can I handle this without having to rewrite all my functions to async instead?
6 comments
W
M
j
Hi. I'm looking to sort tables that contain values which are numeric, but to help the user, I want to add a colorbar in the cell. Because I do that the elements can no longer be sorted. Is there a workaround to allow the cells to be sorted still? I would rather that, than placing colorbar in a separate column. This goes for any type of composite type of cell really. It would be great if you could still sort (given some condition that is sortable).
1 comment
M
Hi. Is there a way to access the session cookies in marimo?
3 comments
M
j
I'm looking for a way to disable a certain UI component at runtime. In particular, I want to create a modal to confirm a choice. Until the choice is confirmed (True/False), I want the rest of the UI to remain disabled in this time. I've created a UI wrapper that uses mo.stop, and states to generate a choice like the one showed on the image, and hide the rest of the rest of the wrapped UI component, until the choice is accepted or declined, but this is rather limiting as I need to pass the UI components that I want to hide. Really what I want is to disable the UI components (grey them out), while still showing them, but I can't figure out if that's possible.
7 comments
j
M
Is there a way to control table column width, so I don't end up with loads of white space around the selector? I want to keep the selector, but dont need to split 50/50 here when there's only one column:
6 comments
M
j
A
I'm looking for a way to generate a plot based on a plotly canvas. I want to create a surface, by clicking on the canvas so that vertices of that surface can be defined. Later, I want to extract the vertices, to be able to fine tune them in my UI. Is that something I could do with Marimo?
10 comments
r
A
I have a state that I use to redraw some UI component, using a dropdown selector that sets the state on it on_change handler. But for some reason, marimo throws an error. The error code is not very useful as it seems to be all marimo internals.
2 comments
M
j
I want to create a batch element, where a drop-down lets the user configure the content of the batch elements, such as having additional features revealed if choosing to do so by the user. For that to work, I need to re-run the cell that generates the batch element. Is there a method to re-run the same cell? I was thinking I could use states to trigger this, but if states are set from the same cell, they dont trigger an update. I couldn't find any documentation about this type of reactivity, as it seems cells can only trigger other cells and not themselves.
2 comments
A
I'm looking for a way to modify an object if it's value changes. Specifically I want to change the label of an object, if the value changes. I can add an on_change handler to detect changes, but once the object is created, I can no longer access it's internals. I tried asking the #ask-docs-ai channel, but I think it's hallucinating: https://discord.com/channels/1059888774789730424/1228123354607648788/1255236745717485568.

If the "self" object was part of on_change function, i.e the function signature always contained "self", and if "self" objects, for which the on_change functions are bindable, could have their property setters, i.e. label, value etc. exposed, then I think it should be possible.
6 comments
M
j
A