GithubHelp home page GithubHelp logo

Comments (6)

yabab-dev avatar yabab-dev commented on April 27, 2024

Maybe same problem : #2
I misunderstood your documentation.

But the only way to change choices of the select is the ajax() function ?

from choices.

yabab-dev avatar yabab-dev commented on April 27, 2024

I've updated the plunker and use now the ajax() function but the wrong order problem persist.

What is my mistake ?

Thanks !

from choices.

jshjohnson avatar jshjohnson commented on April 27, 2024

Hey @chymz,

Adding 'items' via the config is intended for text inputs (so will be ignored for select inputs). I'm in the process of adding 'options' to the config object so you can achieve what you're looking for.

The ordering problem looks like a bug - i'll look into that!

Thanks,

Josh

from choices.

yabab-dev avatar yabab-dev commented on April 27, 2024

Ordering problem isn't a bug, you use sortByAlpha function for ordering choices (https://github.com/jshjohnson/Choices/blob/master/assets/scripts/src/reducers/choices.js#L15)

Maybe you can make it configurable ?

from choices.

jshjohnson avatar jshjohnson commented on April 27, 2024

Hi @chymz,

I have just pushed a new release that allows you to define choices via the config (see https://github.com/jshjohnson/Choices#choices).

I'm going to be implementing custom sorting in the next release - it requires some restructuring.

Thanks

from choices.

jshjohnson avatar jshjohnson commented on April 27, 2024

This has now been implemented as of version 1.0.47.

For reference: https://github.com/jshjohnson/Choices#sortfilter

Thanks!

from choices.

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.