Selaa lähdekoodia

allow a custom function for computing the width. fixes #252

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

+ 2 - 0
select2.js

@@ -1151,6 +1151,8 @@
                     }
 
                     return null;
+                } else if ($.isFunction(this.opts.width)) {
+                    return this.opts.width();
                 } else {
                     return this.opts.width;
                }