Open BenjaminHorn opened 10 years ago
I am having a similar issue. I cannot recreate the example here http://indexiatech.github.io/ember-forms/#/quickexample
I am using Ember 1.7. Some feedback from the developer would be great, but seeing as this issue is more than three months old and has not been addressed I am not optimistic. Are people having success with the select in the newest version of Ember? Is the example supposed to work and I'm doing something wrong?
@asaf how can we bind to the em-select to an ember data 'belongsTo' property? This must be a common use case.
When I do it like in the example http://indexiatech.github.io/ember-forms/controls/select and I select an option I get the error 'Uncaught Error: Assertion Failed: You can only add a [modelName] record to this relationship.
When I replace optionValuePath="content.id"
with optionValuePath="content"
I am able to select an option correctly, but then when I reload the form to edit, the selected option is not set (just goes to the prompt, even though the property is set). Also, validations do not work correctly with this approach.
Please advise.
When I simply use Ember.Select and bind to the selection
property, everything works great (just no validations).
Using em-select I get the problem described above, so this seems to be a problem with ember-forms.
Here is a very simple (working) example, to use the selected value of a select box: http://jsbin.com/pexolude/66/edit
Every time you change the select, the console log shows its value. (I want to make two select boxes where the 2nd one's collection is based on the first one's value)
If i try to do the same with ember-forms select i fail misarable:
http://jsbin.com/pexolude/68/edit
What could be the reason? {{em-select}} is an extend of {{view Ember.Select}} what I used in the first example so it should act the same in this case.
Looking at the source code: https://github.com/ember-addons/ember-forms/blob/master/dist/ember_forms.js#L888 i can see that prompt, optionValuePath, optionLabelPath, content are aliased but value, valueBinding etc are missing.