Igor Vaynberg 12 anos atrás
pai
commit
45559654bc
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      select2.js

+ 2 - 2
select2.js

@@ -1361,6 +1361,8 @@ the specific language governing permissions and limitations under the Apache Lic
             // prevent duplicate queries against the same term
             if (initial !== true && lastTerm && equal(term, lastTerm)) return;
 
+            $.data(this.container, "select2-last-term", term);
+
             // if the search is currently hidden we do not alter the results
             if (initial !== true && (this.showSearchInput === false || !this.opened())) {
                 return;
@@ -1418,8 +1420,6 @@ the specific language governing permissions and limitations under the Apache Lic
 
             this.resultsPage = 1;
 
-            $.data(this.container, "select2-last-term", term);
-
             opts.query({
                 element: opts.element,
                     term: search.val(),