john_helt
john_helt
Mmarimo
Created by john_helt on 1/16/2025 in #help-support
getting the output object from a cell, in which we append the output
I have a table from which I want to select some values, and use this to download attachments, zip them, then present a download button. The process takes time, so I tried using mo.lazy to show a spinner, but it doesn't update more than once, when it's inside an accordion. Therefore, I tried hacking my own solution using the output module. However, it struck me that it's not possible to get the the output object from a cell. I'm thinking something like ```spinner=mo.status.spinner() mo.output.append(spinner) _download_attachments = new_download_attachments_ui(heatpump_table) download_attachments = await _download_attachments()
3 replies
Mmarimo
Created by john_helt on 1/6/2025 in #help-support
justify elements with vstack
No description
9 replies
Mmarimo
Created by john_helt on 12/18/2024 in #help-support
controlling column width in tables
Is there a way to format tables so that the width of different columns can be adjusted?
9 replies
Mmarimo
Created by john_helt on 12/10/2024 in #help-support
Handling race conditions
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
7 replies
Mmarimo
Created by john_helt on 12/5/2024 in #help-support
Wizard style UI
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?
3 replies
Mmarimo
Created by john_helt on 11/26/2024 in #help-support
Change color of element programatically
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
3 replies
Mmarimo
Created by john_helt on 11/19/2024 in #help-support
Table shows "string" or "number" below header
No description
2 replies
Mmarimo
Created by john_helt on 10/28/2024 in #help-support
pre-selecting a table row
I'm wondering if there's a way to pre-select a table row, similarly to that of a dropdown or multiselect component?
3 replies
Mmarimo
Created by john_helt on 10/24/2024 in #help-support
differences between mo.ui.dictionary and python dict?
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?
7 replies
Mmarimo
Created by john_helt on 10/22/2024 in #help-support
running async inside sync cells
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?
7 replies
Mmarimo
Created by john_helt on 10/15/2024 in #help-support
Sorting tables elements that are not fully strings, floats or ints
No description
3 replies
Mmarimo
Created by john_helt on 10/1/2024 in #help-support
Accessing session cookies from marimo
Hi. Is there a way to access the session cookies in marimo?
4 replies
Mmarimo
Created by john_helt on 9/30/2024 in #help-support
Disabling UI at runtime
No description
8 replies
Mmarimo
Created by john_helt on 9/17/2024 in #help-support
Controlling table column width
No description
7 replies
Mmarimo
Created by john_helt on 9/13/2024 in #help-support
Interactive plots with Plotly
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?
12 replies
Mmarimo
Created by john_helt on 8/19/2024 in #help-support
Strange behavior when using allow_self_loops=True on states
No description
3 replies
Mmarimo
Created by john_helt on 7/5/2024 in #help-support
Creating a UI component that can update itself
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.
4 replies
Mmarimo
Created by john_helt on 6/25/2024 in #help-support
Possibility of modifying object to which on_change handler is bound
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.
8 replies