Giter VIP home page Giter VIP logo

Comments (8)

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

Wild guess: put your options out of the properties, as Selectize tries to interpret them, and they are not an array of objects (with text and value fields).

from angular-selectize.

mdmoura avatar mdmoura commented on June 23, 2024

@PhiLhoSoft:
I tried that and didn't solve it ... I got the same error.

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

I suggest to make a fiddle (jsFiddle / Plunker / whatever your choice) reproducing your problem (you can get inspiration from the fiddle linked from the main page). Thus it would be easier to help.

from angular-selectize.

mdmoura avatar mdmoura commented on June 23, 2024

Sorry for the delay. I was able to reproduce this problem:
http://plnkr.co/edit/Ul6x6F?p=preview

If you select an item you will see the error I mentioned on the console.

Any idea why?

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

I think that's because you used the selectize directive as an attribute instead of using it as a tag...
Looks like it is untested, or at perhaps there is a regression, from the library or from angular...

Simple workaround: use <selectize data-ng-model="model.message.property" name="property" data-config="model.properties" data-options="model.options"/> instead. Not exactly the same thing, but globally it works.

from angular-selectize.

mdmoura avatar mdmoura commented on June 23, 2024

I am using as an attribute since I need the HTML to validated by W3C.
I wonder if this is something that is fixable or not ...

from angular-selectize.

PhiLhoSoft avatar PhiLhoSoft commented on June 23, 2024

It looks like AngularJS sees the select element and applies the selectDirective to it, conflicting with the angular-selectize directive.

There is a workaround: Selectize can be used on an <input type="text"> element, or even on a simple div: <div data-ng-model="model.message.property" name="property" data-selectize data-config="model.properties" data-options="model.properties.options"></div> works.

from angular-selectize.

jbubsk avatar jbubsk commented on June 23, 2024

@PhiLhoSoft , thanks! That workaround works perfectly!

from angular-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.