diff --git a/select2-latest.html b/select2-latest.html old mode 100755 new mode 100644 index 13441398..22dc1385 --- a/select2-latest.html +++ b/select2-latest.html @@ -207,6 +207,7 @@ $("#e10_3").select2({
  • Events: Reacting to External Changes
  • Disabled Mode
  • Custom Matcher Function
  • +
  • Sorting Displayed Results
  • Responsive Design
  • @@ -823,6 +824,44 @@ $("#e17_2").select2({ +
    + +
    +

    Sorting Displayed Results

    +

    Unlike other dropdowns on this page, this one filters results by query string normally, but returns the matched results sorted from shortest to longest by string length. Try typing 'e' and seeing how the results are sorted. This function is useful for sorting results by relevance to a user's query.

    +

    +
    +

    +
    +
    +

    Example Code

    +
    +            
    +
    +
    +