Comments (9)
The correct property name is optionValuePath
and not optionsValuePath
, as stated in the readme.
Please confirm if this was the problem. If the problem persists, please post the template you used.
Ember data objects should definitely work.
from ember-cli-selectize.
Sorry that was a typo. I am using optionValuePath
and it's really not working :(.
Template:
{{ember-selectize content=tags selection=picture.tags optionLabelPath='content.name' optionValuePath='content' multiple=true}}
This does not work if tags is a hasMany relationship and also it does not work when tags is an array of Ember.Objects.
from ember-cli-selectize.
What's does the template you're using to render ember-selectize looks like?
from ember-cli-selectize.
just updated.
from ember-cli-selectize.
The problem is probably related with optionValuePath='content'
.
Selectize requires us to have unique identifiers for each of our options. What were you really trying to accomplish with optionValuePath='content'
?
A typical use would be optionValuePath='content.id'
.
from ember-cli-selectize.
I want to pass the Ember data model. That's required when working with
relationships as Ember data will take care of serialzing this into the
correct JSON representation.
Am 18.03.2015 16:07 schrieb "Miguel Andrade" [email protected]:
The problem is probably related with optionValuePath='content'.
Selectize requires us to have unique identifiers for each of our options.
What were you really trying to accomplish with optionValuePath='content'?—
Reply to this email directly or view it on GitHub
#44 (comment)
.
from ember-cli-selectize.
The Ember data models are already being passed through content=tags
.
Also, since multiple=true
, then selection
will be an array filled with objects from tags
. Since selection
is bound to picture.tags
, then picture.tags
will have ember data models.
Isn't this what your aiming at?
from ember-cli-selectize.
Aaah! Thanks a lot. valueOptionPath 'content.id' works correctly. 👍 Thanks for helping out!
from ember-cli-selectize.
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.
from ember-cli-selectize.
Related Issues (20)
- hideSelected and multiple don't work together HOT 1
- v0.5.8 broke the selectize styles HOT 4
- selectize.js:2151 Uncaught TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'
- multiple mode bug? HOT 2
- Selectize changing my model property to null
- Best Practice for adding/removing on a REST/API error
- add 'readOnly' to 'generalOptions ' HOT 2
- Move selectize and sifter from Bower to NPM HOT 3
- select-item action should not fire when selection promise resolves. HOT 1
- Using multiple=true with ember-changeset-validations HOT 3
- Add Support for data-dash-attributes
- Can't install due to missing dependency HOT 1
- Label truncates when second word contains letters in the first in multiple mode HOT 1
- Tooltip for list
- 2 selectors in the same template and options visible for both of them at the same time HOT 1
- Fix breaking changes in FastBoot 1.0 HOT 1
- Migration to power select HOT 1
- DEPRECATION HOT 1
- Deprecated calls to sendAction
- ember-cli-selectize triggers a Maximum Call Stack exceeded errors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ember-cli-selectize.