Permalink
Browse files

Fix element order for non-grouped elements

  • Loading branch information...
1 parent b4ce7eb commit a0bbf08ff43ac9a2142e3cca07c78e78b82a9cb6 @michaelperrin michaelperrin committed Oct 8, 2012
Showing with 5 additions and 5 deletions.
  1. +2 −2 lib/ajax-chosen.js
  2. +3 −3 src/ajax-chosen.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -104,10 +104,10 @@ do ($ = jQuery) ->
.attr('value', value)
.html(text)
.appendTo(group)
- else if $.inArray(value + "-" + element, selected_values) == -1
+ else if $.inArray(element.value + "-" + element.text, selected_values) == -1
$("<option />")
- .attr('value', value)
- .html(element)
+ .attr('value', element.value)
+ .html(element.text)
.appendTo(select)
# Tell chosen that the contents of the <select> input have been updated

0 comments on commit a0bbf08

Please sign in to comment.