1
0
mirror of synced 2025-02-10 09:09:24 +03:00

Merge pull request #697 from agworld/add-load-more-padding-option

add loadMorePadding option
This commit is contained in:
Igor Vaynberg 2013-01-10 08:47:05 -08:00
commit 5f2828098e

View File

@ -1176,7 +1176,7 @@ the specific language governing permissions and limitations under the Apache Lic
if (more.length === 0) return; if (more.length === 0) return;
below = more.offset().top - results.offset().top - results.height(); below = more.offset().top - results.offset().top - results.height();
if (below <= 0) { if (below <= this.opts.loadMorePadding) {
more.addClass("select2-active"); more.addClass("select2-active");
this.opts.query({ this.opts.query({
term: term, term: term,
@ -2411,6 +2411,7 @@ the specific language governing permissions and limitations under the Apache Lic
// plugin defaults, accessible to users // plugin defaults, accessible to users
$.fn.select2.defaults = { $.fn.select2.defaults = {
width: "copy", width: "copy",
loadMorePadding: 0,
closeOnSelect: true, closeOnSelect: true,
openOnEnter: true, openOnEnter: true,
containerCss: {}, containerCss: {},