Skip to content

Commit

Permalink
Make sure default class is applied before rebuilding results.
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Filler committed May 8, 2012
1 parent b028f9e commit 0bdb09c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.js
Expand Up @@ -499,7 +499,7 @@ Copyright (c) 2011 by Harvest
this.search_choices.find("li.search-choice").remove();
this.choices = 0;
} else if (!this.is_multiple) {
this.selected_item.find("span").text(this.default_text);
this.selected_item.addClass("chzn-default").find("span").text(this.default_text);
if (this.form_field.options.length <= this.disable_search_threshold) {
this.container.addClass("chzn-container-single-nosearch");
} else {
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.jquery.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion chosen/chosen.proto.js
Expand Up @@ -487,7 +487,7 @@ Copyright (c) 2011 by Harvest
this.search_choices.select("li.search-choice").invoke("remove");
this.choices = 0;
} else if (!this.is_multiple) {
this.selected_item.down("span").update(this.default_text);
this.selected_item.addClassName("chzn-default").down("span").update(this.default_text);
if (this.form_field.options.length <= this.disable_search_threshold) {
this.container.addClassName("chzn-container-single-nosearch");
} else {
Expand Down
2 changes: 1 addition & 1 deletion chosen/chosen.proto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion coffee/chosen.jquery.coffee
Expand Up @@ -171,7 +171,7 @@ class Chosen extends AbstractChosen
@search_choices.find("li.search-choice").remove()
@choices = 0
else if not @is_multiple
@selected_item.find("span").text @default_text
@selected_item.addClass("chzn-default").find("span").text(@default_text)
if @form_field.options.length <= @disable_search_threshold
@container.addClass "chzn-container-single-nosearch"
else
Expand Down
2 changes: 1 addition & 1 deletion coffee/chosen.proto.coffee
Expand Up @@ -162,7 +162,7 @@ class Chosen extends AbstractChosen
@search_choices.select("li.search-choice").invoke("remove")
@choices = 0
else if not @is_multiple
@selected_item.down("span").update(@default_text)
@selected_item.addClassName("chzn-default").down("span").update(@default_text)
if @form_field.options.length <= @disable_search_threshold
@container.addClassName "chzn-container-single-nosearch"
else
Expand Down

0 comments on commit 0bdb09c

Please sign in to comment.