HotDrink / hotdrink

JavaScript MVVM library with support for multi-way dependencies and generic, rich UI behaviors.
http://hotdrink.github.io/hotdrink/
58 stars 9 forks source link

binding order #30

Open philipvr opened 12 years ago

philipvr commented 12 years ago

In the following code snippit the foreach binding must must precede the select binding in order for the correct initial option to be selected.

<select id="dropdown" data-bind="foreach: options, selectOne: selected">
    <option data-bind="attr: {value: $this}, text: $this"></option> 

HotDrink provides no guarantees as to the order these bindings. John had mentioned that perhaps the selectOne binding needs to listen for changes not just on the variable, but on the DOM element.