Is there a properly tested alternative to Select2 or Chosen? [closed]
Asked Answered
H

3

114

I am looking for an alternative to Select2 that basically provides the same functionality, but includes proper tests.

The quest for the holy grail? The last unicorn?

Hula answered 21/3, 2013 at 10:17 Comment(3)
ideally it would be angularjs based...Isobaric
Good question. The answer, of course, is to pony up and write the tests. That's what open source is all about.Cohen
I have started a new project out of this same desire (and some others) recently: github.com/arendjr/select3Perforation
I
126

Selectize.js is a select2 alternative I've been working on that has a suite of tests using a combination of testem, syn, mocha, and chai. Right now there are the following classes of tests:

  • Interaction
    Functional tests that makes sure the control behaves as if the user is using it (using syn).
  • Setup
    Ensures the control can be initialized properly from existing <select> and <input> elements.
  • API
    Tests core API methods for proper functionality.
  • Events
    Ensures built-in events get fired at the right times with the proper arguments.
  • XSS
    Tests a handful of potential exploits.

With that said, the tests aren't as expansive as I want them to be, but it's getting there :)

Immolation answered 29/7, 2013 at 2:56 Comment(15)
Thanks for Selectize.js, I found it so much better and easier to use than Chosen or Select2. But please, release it on npm so I can install it and use with browserify without a hassle instead of storing sources in vendor directory.Tuatara
Thanks for this. I have been looking around at different select list & tag replacements - not sure why it took this long to find Selectize.Khoury
@Tuatara you can always do this npmjs.org/doc/files/package.json.html#github-urlsKeister
It's nice and pretty, but completely useless when using it with remote data, which is really where select2 shines.Proboscidean
After wasting 2 days behind Select2, finally went for Selectize.js. And could make it up and running Ajax drop down neatly in few mins. Neat and Clear examples, very good documentation.Traylor
@skerit I found it much easier than select2 even when using with remote data. I belive Select2 is much hyped (sorry, but its my personal opinion, I am not biased towards anyone. Personally I first tried Select2 and then went for Selectize)Traylor
@skerit is right, I have an ajax powered select with selectize and I need to change its value and reset the value. I can't, Is too difficultKerstinkerwin
Note: Selectize does NOT support disabled states for <select> nor <option>.Sinclare
@Rygu It does support disabled <select> elements: github.com/brianreavis/selectize.js/blob/master/examples/…Immolation
I spent 1.5 days with Select2 and it still wasn't good enough. I also tried Selectivity, which didn't do what I needed either. I swapped over to Selectize and had it wrapped up in an hour. Cheers.Charmainecharmane
FYI selectize is on npm now so dead easy to integrate if you are using browserify/CommonJS. See npmjs.com/package/selectizeMagical
If anybody is looking for a alternative to Selectize that doesn't require jQuery as a dependency, I wrote my own plugin: github.com/jshjohnson/ChoicesManana
Please also mention Which is Mobile friendly Select2 or Selectize or Chosen ?Quiteris
Wow, this is very nice and clean after years of Select2 and Chosen! Lovely.Shortcoming
Addendum, Selectize.js is dead. Go with Choices from @jshjohnson.Shortcoming
H
4

Note: I'm no longer maintaining this project. Choose another one.


Bselect, which I develop, is tested, however doesn't include all the features (yet) from Select2/Chosen.

If you want, join me in its development :)

Helbonnah answered 17/5, 2013 at 20:59 Comment(1)
Maintained fork available at github.com/derflocki/bselectLudovika
D
4

Another possible alternative is bootstrap-multiselect

"JQuery multiselect plugin based on Twitter Bootstrap"

Examples and documentation: http://davidstutz.github.io/bootstrap-multiselect/

  • The repository does not contain any automated tests, manual tests instead
  • Themed using Bootstrap 3
  • JavaScript source code is short: 800 lines of code
  • 524 stars on GitHub (as of 2013/12/13)
Debouch answered 13/12, 2013 at 16:23 Comment(1)
very nice. doesnt support items with imagesHoley

© 2022 - 2024 — McMap. All rights reserved.