Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trigger "chosen:no_result" event #1712

Merged
merged 1 commit into from
Feb 7, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions coffee/chosen.jquery.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,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
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,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