Feature request: multiple binds to the same variable #1103
-
Hello and thank you all for the wonderful software that is Pluto notebooks! It would be great if we could create multiple One use case for this would be to have a slider for adjusting a variable, and also a text field for inputting an exact value. I often have a hard time choosing between a slider which is quick to adjust, and a text field where I can enter something exact. A second use case, is when you a set of sliders and two or more ways of visualizing the results, e.g. two plots. It would be great if we could put a copy of the sliders above both plots and have them kept in sync. Since I understand that the inputs are now synchronized across different browser sessions, perhaps this is not too intrusive of a change. Also, in my mind, this doesn't break the reactive concept of Pluto. Unlike multiple variable declarations, this would be essentially just one declaration shown in multiple ways/locations. Thanks for reading! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Thanks for the tip! Can you try to rephrase your issue as a statement of a problem, rather than a direct feature request? Emphasize the problem you face, and make this the main subject of your message. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It is possible, as long as you combine all bonds in a single cell, using a # ╔═╡ b9226b48-aeeb-4a48-8420-5ca577359a49
begin
b1 = @bind x Slider(5:15)
b2 = @bind x NumberField(5:15)
end;
# ╔═╡ dcdac710-8dd4-4724-93ce-4bd046950a5f
b1
# ╔═╡ a2612b3b-bb90-40d8-8869-78568f2cb6c9
b2 Schermopname.2021-04-17.om.01.08.46.mov |
Beta Was this translation helpful? Give feedback.
It is possible, as long as you combine all bonds in a single cell, using a
begin
block. You can assign names to the bonds to reference them again:Schermopname.2021-04-17.om.01.08.46.mov