Skip to content

Instantly share code, notes, and snippets.

@sshaw
Created March 23, 2012 19:44
Show Gist options
  • Save sshaw/2174243 to your computer and use it in GitHub Desktop.
Save sshaw/2174243 to your computer and use it in GitHub Desktop.
Ember.js Chosen Multiple Select
// Tested with 1.0.0-pre.2, 0.9.7 or less does not work.
// Chosen modified to search on @results_data[n].text not .html
App.ChosenMultipleSelect = Em.Select.extend({
multiple: true,
attributeBindings: [ 'multiple' ],
didInsertElement: function() {
this._super();
this.$().chosen();
},
selectionChanged: function() {
this.$().trigger('liszt:updated');
}.observes('selection')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment