Open philipvr opened 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.
In the following code snippit the foreach binding must must precede the select binding in order for the correct initial option to be selected.
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.