Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. COThanks Patrick, is there any other way to get the selected value from a select box rather than assigning a value property? I can understand knockout binds the control whenever the value changes immediately. like other input controls text,button etc, the events will fires when the attached event handlers are called. if i remove value binding from the select box, then the change event will work whenever the user select a options from the select box, rather than initial stage. but the issue is how can i get the currently selected value?
      singulars
    2. COYou get or set the current option using the value binding. With my sample case, if, at any time you want to get the current selection for the select, you can simply say `selectedItem()`. This will return the currently selected object in the `option` binding. This page describes everything about using `<select>` elements with Knockout: http://knockoutjs.com/documentation/options-binding.html
      singulars
    3. COBasically, once you set up the data-bindings, you will only need to interact with the observables. Adding/removing elements to the select will require adding/removing elements from the observable array (your `list` variable). Getting/setting the selection of the select will be done through the `selectedItem` observable. Subscriptions to change events can be done using the `selectedItem` as well. That is all you should really need.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload