Comments (5)
Lift instantiates a new ToggleButtons with its own signal each time the first toggle button updates, so you will have to create a signal and have the toggle buttons update that.
ff = ["F1","F2","F3","F4"]
f1 = togglebuttons(ff)
f1_inp = Input("F2") # This is what f2 will update.
display(f1)
f2 = lift(x->togglebuttons(signal=f1_inp, filter(a->a!=x,ff)),f1)
display(f2)
display(signal(f1))
display(f1_inp)
Should help you.
I'm not entirely sure why when I select F3 in the first set, I get the ordering F1, F4, F2. Will look into this.
from interact.jl.
i tried your suggested solution, but didn't work either.
from interact.jl.
Could you be more specific about what happens when you run the code? It works for me. Also which browser are you using? Do togglebuttons generally update like they should?
from interact.jl.
i am using Julia-0.4-dev on x64 win7 with Chrome(37.0.2062.103 m)
- Gadfly 0.3.7
- IJulia 0.1.15
- Interact 0.1.4
it's behave the same way i posted originally. second togglebuttons updated, but in strange order, and also cann't output F1.
from interact.jl.
This works on master:
using Interact
ff = ["F1","F2","F3","F4"]
f1 = togglebuttons(ff)
f1_inp = Signal("F2")
f2 = map(signal(f1)) do x
togglebuttons(filter(a->a!=x, ff); signal=f1_inp)
end
display.([f1, f2, signal(f1), f1_inp]);
The ordering is a bug in ipywidgets, would be good if you can report it there, Python code:
from IPython.display import display
from ipywidgets import ToggleButtons
tb = ToggleButtons()
tb.options = [1,2,3]
display(tb)
tb.options = [0,1,2]
The order should be 0,1,2
from interact.jl.
Related Issues (20)
- Does not work with Jupyterlab 3.0.14 HOT 1
- interact error with GLMakie in atom
- Widget creation gradually becomes very slow HOT 2
- Excruciatingly slow on Windows HOT 2
- More detailed examples of a standalone web page
- Compatibility issue with DataFrames HOT 1
- VS Code integration HOT 4
- TagBot trigger issue HOT 2
- ErrorException: Invalid dependency (must be a url, file, or AssetRegistry path): C:\Users\Stephen\.julia\packages\Knockout\3gjS1\src\..\assets\knockout.js HOT 5
- ERROR: UndefVarError: WEAVE_ARGS not defined HOT 1
- Update README to install webio jupyter extensions via Conda instead of WebIO
- map bang syntax help needed HOT 2
- How can I read a *.mat file as values {Float64} ?
- Julia: using @manipulate creates plot but doesn't update after saving notebook and reopening HOT 2
- when using @manipulate, it output error messages HOT 5
- Interact does not show widgets in IJulia HOT 2
- savedialog() on MacOSX throws UndefVarError HOT 6
- Doesn't seem to work in JupyterLab 3.1.7 HOT 2
- How to update two widgets on some event
- UndefVarError: setexcludinghandlers! not defined in Jupyter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from interact.jl.