简体   繁体   中英

ember.js Ember.Select value binding with multiple options

I am trying to create a multiple select input element in Ember, where the content is coming from a hash, containing the label, value and group for the different options. This works fine, however I am not able to access the value binding.

Here is the JSBin ; after submitting the form, it logs the selectedField variable to the console which is always 'undefined'.

I would like to implement the binding so that the initial contents of selectedField are preselected.

Update: I now see that the value method is unsupported for multiple selections, but then how do I pre-select and retrieve the selections?

解决:我需要通过“选择”绑定选择(请参见JSBin)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM