Hi, I’m trying to synchronize two components: a counter and a slider, so that:
if the slider is moved, then the counter shows that number
if the counter is changed, then the slider shows that number
Also I’d like to trigger an event when either change, and also I’d like to be able to programmatically change them.
So, I’m not sure if this is a ‘binding’ problem, or a ‘syncing’ problem.
Also, I’m not sure if one should be a master and the other a slave, or whether I should create an invisible databound object which would be the master.
Thanks Maksim, your solution is the one I implemented, you might want to note somewhere in the docs that slider isn’t bindable (or sync-able, I’m still unclear on the distinction).
I actually simplified my question because there are 7 sliders and 7 counters that need to all be synchronized, so the current solution is a bit verbose.
Ideally some future version of Webix would allow the creation of a single reactive variable which the UI widgets could one-way bind to declaratively (i.e ‘@variable’ ), or equivalent.
Personally I’d advise against two-way binding, btw.