Selaa lähdekoodia

make query() aware of the element select2 is attached to. fixes #561

Igor Vaynberg 12 vuotta sitten
vanhempi
commit
f15583a555
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. 2 0
      select2.js

+ 2 - 0
select2.js

@@ -1288,6 +1288,7 @@ the specific language governing permissions and limitations under the Apache Lic
             if (below <= this.opts.loadMorePadding) {
                 more.addClass("select2-active");
                 this.opts.query({
+                        element: this.opts.element,
                         term: term,
                         page: page,
                         context: context,
@@ -1382,6 +1383,7 @@ the specific language governing permissions and limitations under the Apache Lic
 
             this.resultsPage = 1;
             opts.query({
+                element: opts.element,
                     term: search.val(),
                     page: this.resultsPage,
                     context: null,