diff options
Diffstat (limited to 'assets/js/src/App.js')
-rw-r--r-- | assets/js/src/App.js | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/assets/js/src/App.js b/assets/js/src/App.js index 0102ada4..976b4554 100644 --- a/assets/js/src/App.js +++ b/assets/js/src/App.js @@ -156,10 +156,18 @@ App.prototype.autoComplete = function() { }; App.prototype.chosen = function() { - $(".chosen-select").chosen({ - width: "180px", - no_results_text: $(".chosen-select").data("notfound"), - disable_search_threshold: 10 + $(".chosen-select").each(function() { + var searchThreshold = $(this).data("search-threshold"); + + if (searchThreshold === undefined) { + searchThreshold = 10; + } + + $(this).chosen({ + width: "180px", + no_results_text: $(this).data("notfound"), + disable_search_threshold: searchThreshold + }); }); $(".select-auto-redirect").change(function() { |