-
|
I want to populate the options of one dropdown based on the selection made in another. Like this: This simple example works fine. But in a more complicated example when I use the values from the two dropdowns to parameterise a function call and produce a figure, it fails when I change the selection in the first dropdown with an error like this: It occurs to me there might be some kind of race condition causing the problem in my more complicated case so I was wondering if before I report a bug, there is something wrong with this pattern. Perhaps I should be bundling the dropdowns into a single component using an array or dictionary. But if that's the case then how can one dropdown access the value in the other? Note that there are no circular references in this pattern. The first dropdown affects the options in the second, with no effect in the other direction. Any wisdom of experience welcome. Marimo is new to me. I was excited to have built this example (it takes a while to initialise) earlier as a proof of concept, but now I'm tripping up at the first attempt to make the inputs and their interactions a bit richer! I'm keen to avoid learning JS and observable to get this kind of reactive notebook, so any input very welcome! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
This looks like a typo in your code? If you replace with I think it will work. |
Beta Was this translation helpful? Give feedback.
This looks like a typo in your code? If you replace
with
I think it will work.