knockout.js data-binding to dropdown overwrites original value -


i have function puts object observable called "detailedstudent" display of student's fields in modal. here's problem:

  1. i start field has value of false. (includeinstudentsiteresults)
  2. i set 'student' object inside 'detailedstudent' displays dropdown list (simulating modal popup).
  3. the field's value gets set true, first option in dropdown list.

here's jsfiddle reproduces problem: http://jsfiddle.net/62fdb/16/

dropdown option values strings (not booleans). update data initialization so

... "includeinstudentsiteresults": "false", ... 

jsfiddle:http://jsfiddle.net/62fdb/22/

or use solution following post knockoutjs (version 2.1.0): bind boolean value select box


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -