You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I want to use the value of the dropdown menu in opt2 to do something (like, generate a plot). But when I run
val = Interact.@mapdo_work(&opt2)
I get the ui element that correspond to the dropdown menu, instead of it's value. I would have thought that the natural way to do this would be:
val = Interact.@mapdo_work(&&opt2)
but this syntax is not supported and returns an error. Is it possible to support something like this? I came upon this when I was trying to dynamically generate a UI for several different types of plots, where there are specific options that are only available for certain types of plots.
For what it's worth, I'm currently, I'm getting around this by doing something like the following:
opt2_val =Observable{Any}()
opt2 = Interact.@mapbeginif&opt1 =="Option 1"
s =dropdown(["A", "B", "C"], label ="Second Layer")
else
s =dropdown(["A", "C"], label ="Second Layer")
end
opt2_val[] = s[]
map!(identity, opt2_val, s)
end
val = Interact.@mapdo_work(&opt2_val)
This seems to work, but it's awkward to do and I'm worried that it's not best practices.
The text was updated successfully, but these errors were encountered:
Suppose I have the following example.
Now, I want to use the value of the dropdown menu in
opt2
to do something (like, generate a plot). But when I runI get the ui element that correspond to the dropdown menu, instead of it's value. I would have thought that the natural way to do this would be:
but this syntax is not supported and returns an error. Is it possible to support something like this? I came upon this when I was trying to dynamically generate a UI for several different types of plots, where there are specific options that are only available for certain types of plots.
For what it's worth, I'm currently, I'm getting around this by doing something like the following:
This seems to work, but it's awkward to do and I'm worried that it's not best practices.
The text was updated successfully, but these errors were encountered: