Hello Everyone,
Since I start developing with Ember, I’ve got problems with select, usually I solve it with something, but Today I found my problem, and now I don’t know what is the best solution.
The problem is:
I define call the view select with that:
{{view "select" value=model.parent
selection=model.parent
optionLabelPath='content.path_name'
optionValuePath='content'
content=listGroups
prompt="Select group"
class="form-control"}}
And I’ve got the list of elements for the view using a this.store.find… like that:
listGroups: function (){
return this.store.find('group');
}.property(),
My problem is: when emberJS show the view, It loads parent.model, when it see that parent.model is non existing on listGroups because it doesn’t exist, it changes or ignores (I don’t know exacly, because the changes don’t appear on other views) and when the listGroups load, it don’t know the correct value.
Now, I made a variable that is idGroup, and put value=idGroup, etc… But I don’t know if it’s the best solution.
Thanks!
Edit: Sorry, You can look one of my projects that I’ve got this problem in GitHub - Dracks/password-manager-emberjs: The view with EmberJS for the project password-manager-django (I change a little things on the code for the post, but it’s based on password-manager-emberjs/edit.js at master · Dracks/password-manager-emberjs · GitHub and password-manager-emberjs/edit.hbs at master · Dracks/password-manager-emberjs · GitHub )