Giter Club home page Giter Club logo

Comments (9)

miguelcobain avatar miguelcobain commented on August 19, 2024

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.

LevelbossMike avatar LevelbossMike commented on August 19, 2024

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.

miguelcobain avatar miguelcobain commented on August 19, 2024

What's does the template you're using to render ember-selectize looks like?

from ember-cli-selectize.

LevelbossMike avatar LevelbossMike commented on August 19, 2024

just updated.

from ember-cli-selectize.

miguelcobain avatar miguelcobain commented on August 19, 2024

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.

LevelbossMike avatar LevelbossMike commented on August 19, 2024

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.

miguelcobain avatar miguelcobain commented on August 19, 2024

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.

LevelbossMike avatar LevelbossMike commented on August 19, 2024

Aaah! Thanks a lot. valueOptionPath 'content.id' works correctly. 👍 Thanks for helping out!

from ember-cli-selectize.

LevelbossMike avatar LevelbossMike commented on August 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.