Browse Source

Fixed incorrect classes on "Loading more results" message

This fixes an issue where the old `option` and `load-more` classes were
not switched over to the newer BEM style of class names. Unfortunately
this is a breaking change, but this is also a bug given that it doesn't
follow the proper prefixing and is likely to conflict with larger
applications.

https://github.com/select2/select2/issues/3889
Kevin Brown 9 years ago
parent
commit
c53b2dcf11
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/js/select2/dropdown/infiniteScroll.js

+ 3 - 1
src/js/select2/dropdown/infiniteScroll.js

@@ -73,7 +73,9 @@ define([
 
 
   InfiniteScroll.prototype.createLoadingMore = function () {
   InfiniteScroll.prototype.createLoadingMore = function () {
     var $option = $(
     var $option = $(
-      '<li class="option load-more" role="treeitem"></li>'
+      '<li ' +
+      'class="select2-results__option select2-results__option--load-more"' +
+      'role="treeitem" aria-disabled="true"></li>'
     );
     );
 
 
     var message = this.options.get('translations').get('loadingMore');
     var message = this.options.get('translations').get('loadingMore');