소스 검색

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

Igor Vaynberg 13 년 전
부모
커밋
b672d760ac
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;
                }