cleaned up variable name. issue #32
This commit is contained in:
parent
34913e9557
commit
c87e5706e7
10
select2.js
10
select2.js
@ -948,7 +948,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
postprocessResults: function (data, initial) {
|
postprocessResults: function (data, initial) {
|
||||||
var selected = 0, self = this, toggleSearchInput = true;;
|
var selected = 0, self = this, showSearchInput = true;
|
||||||
|
|
||||||
// find the selected element in the result list
|
// find the selected element in the result list
|
||||||
|
|
||||||
@ -966,11 +966,11 @@
|
|||||||
// hide the search box if this is the first we got the results and there are a few of them
|
// hide the search box if this is the first we got the results and there are a few of them
|
||||||
|
|
||||||
if (initial === true) {
|
if (initial === true) {
|
||||||
toggleSearchInput = data.results.length >= this.opts.minimumResultsForSearch;
|
showSearchInput = data.results.length >= this.opts.minimumResultsForSearch;
|
||||||
this.search.parent().toggle(toggleSearchInput);
|
this.search.parent().toggle(showSearchInput);
|
||||||
|
|
||||||
//add "select2-with-searchbox" to the dropdown container if search box is shown
|
//add "select2-with-searchbox" to the container if search box is shown
|
||||||
this.container[toggleSearchInput ? "addClass" : "removeClass"]("select2-with-searchbox");
|
this.container[showSearchInput ? "addClass" : "removeClass"]("select2-with-searchbox");
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user