JuliaGizmos / InteractBase.jl

Build interactive HTML5 widgets in Julia
Other
27 stars 23 forks source link

Allow observables in more places #48

Open piever opened 6 years ago

piever commented 6 years ago

All widget arguments that are passed to Knockout (e.g. the list of options) should also accept Observables and when upgraded Knockout would automatically update only that part of the widget.

piever commented 6 years ago

Related concern, if the user uses an observable of widgets, i.e.

options = Observable(["a", "b", "c"])
wdg = map(dropdown, options)

then observe(wdg) should probably be made to work somehow.

There is a bit of a choice whether to have upgradable widgets (meaning where one can change list of options, style or other attributes) one should simply pass observables to knockout and have it take care of it or use the Observable{Widget} approach.

piever commented 6 years ago

Fixed in the case of options by #49

piever commented 6 years ago

Range of a slider is probably another good case where this would be useful.