This commit is contained in:
parent
bc9867af0b
commit
a7d0849d23
21
select2.js
21
select2.js
@ -400,6 +400,10 @@
|
|||||||
throw new Error("formatterName must be a function or a falsy value");
|
throw new Error("formatterName must be a function or a falsy value");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function evaluate(val) {
|
||||||
|
return $.isFunction(val) ? val() : val;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blurs any Select2 container that has focus when an element outside them was clicked or received focus
|
* blurs any Select2 container that has focus when an element outside them was clicked or received focus
|
||||||
*
|
*
|
||||||
@ -429,9 +433,20 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function evaluate(val) {
|
/**
|
||||||
return $.isFunction(val) ? val() : val;
|
* Closes any opened Select2s when the window is resized
|
||||||
}
|
*/
|
||||||
|
$(window).resize(debounce(100, function() {
|
||||||
|
$(".select2-container.select2-dropdown-open").select2('close');
|
||||||
|
}));
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Closes any opened Select2s when the window is scrolled
|
||||||
|
*/
|
||||||
|
$(window).scroll(debounce(100, function() {
|
||||||
|
$(".select2-container.select2-dropdown-open").select2('close');
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new class
|
* Creates a new class
|
||||||
|
Loading…
Reference in New Issue
Block a user