Skip to content

Commit

Permalink
Merge pull request harvesthq#1712 from lightxu/patch-1
Browse files Browse the repository at this point in the history
Empty search triggers "chosen:no_results" event
  • Loading branch information
pfiller committed Feb 7, 2014
2 parents dab3132 + 29dd80b commit c62d160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions coffee/chosen.jquery.coffee
Expand Up @@ -407,6 +407,7 @@ class Chosen extends AbstractChosen
no_results_html.find("span").first().html(terms)

@search_results.append no_results_html
@form_field_jq.trigger("chosen:no_results", {chosen:this})

no_results_clear: ->
@search_results.find(".no-results").remove()
Expand Down
1 change: 1 addition & 0 deletions coffee/chosen.proto.coffee
Expand Up @@ -401,6 +401,7 @@ class @Chosen extends AbstractChosen

no_results: (terms) ->
@search_results.insert @no_results_temp.evaluate( terms: terms )
@form_field.fire("chosen:no_results", {chosen: this})

no_results_clear: ->
nr = null
Expand Down

0 comments on commit c62d160

Please sign in to comment.