Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hasMany value show a blank rectangle #107

Closed
GCorbel opened this issue Jun 27, 2015 · 7 comments
Closed

hasMany value show a blank rectangle #107

GCorbel opened this issue Jun 27, 2015 · 7 comments

Comments

@GCorbel
Copy link

GCorbel commented Jun 27, 2015

Hello,

I have this simple selector :

{{select-2
    content=skills
    value=choosedSkills
    multiple=true
}}

With this controller :

export default Ember.Controller.extend
  choosedSkills: (->
    @model.get('skills')
  ).property('choosedSkills')
  skills: (->
    @store.findAll 'skill'
  ).property('skills')

I think all skills of the model should be assigned but I have this result :

capture du 2015-06-27 13 53 48

When I try this :

export default Ember.Controller.extend
  choosedSkills: (->
    [{name: 'test', description: 'test'}]
  ).property('choosedSkills')
  skills: (->
    @store.findAll 'skill'
  ).property('skills')

It works.

Does ember-select-2 works with hasMany associations ?

@abobwhite
Copy link

@GCorbel I created an issue for this last week with the same issue: #105. I haven't heard anything back but looking through the code, it appears that ember-select-2 does not currently support hasMany because it setting the array instead of adding/removing from it which throws a console error seen in #105. If you open your console and are seeing this read-only error, you should go ahead and add your info to #105 and close this issue.

@vst
Copy link

vst commented Jul 8, 2015

Confirmed. Furthermore, if the value is a property of a DS object, the two way binding is broken, too.

@GCorbel
Copy link
Author

GCorbel commented Jul 28, 2015

It works now.

@GCorbel GCorbel closed this as completed Jul 28, 2015
@abobwhite
Copy link

How can it work now? There have been no commits to this repo since before you even opened this issue......

@GCorbel

@GCorbel
Copy link
Author

GCorbel commented Jul 28, 2015

I saw. It maybe because of an update of ember...

@yaapis
Copy link

yaapis commented Aug 15, 2015

Same issue with ember 1.13.3 and ember data 1.13.5

@angouleme
Copy link

for everyone getting similar error (select2 with multiple option and hasMany), in last comment of this issue: #105 I've posted a workaround that worked quite well for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants