-
Notifications
You must be signed in to change notification settings - Fork 80
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
When passing objects as content/selection removing them throws error #44
Comments
The correct property name is Ember data objects should definitely work. |
Sorry that was a typo. I am using Template:
This does not work if tags is a hasMany relationship and also it does not work when tags is an array of Ember.Objects. |
What's does the template you're using to render ember-selectize looks like? |
just updated. |
The problem is probably related with Selectize requires us to have unique identifiers for each of our options. What were you really trying to accomplish with A typical use would be |
I want to pass the Ember data model. That's required when working with
|
The Ember data models are already being passed through Isn't this what your aiming at? |
Aaah! Thanks a lot. valueOptionPath 'content.id' works correctly. 👍 Thanks for helping out! |
Oh and I also noticed that I am apparently too dumb to read the documentation correctly because it's basically in the documentation how to do this. Sorry for bothering and thanks for your help again. |
Hi!
When passing an array of Objects to the content property (e.g. an array of ember-data models) and using
content
asoptionsValuePath
(e.g. as needed by ember-data when working with relationships) removing an object from the selection throws an error in selectize.Uncaught TypeError: $item.attr is not a function
in selectize's removeItem-methodBecause the observers that trigger this code are also triggered on
willDestroyElement
this also fails when removing the component from the DOM.This makes this addon basically unusable for working with ember-data relationships which is very unfortunate because ember.select is also not working for ember-data relationships ;).
I am happy to help with solving this issue but I think input from @miguelcobain would be very useful as I am not really familiar with selectize or ember-cli-selectize.
Any idea what's the problem here?
And of course thanks for this great addon!
The text was updated successfully, but these errors were encountered: