소스 검색

Merge pull request #183 from ryfeng/master

Default to width: auto instead of width: 0px when styling select2-container
Igor Vaynberg 13 년 전
부모
커밋
cb72651787
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      select2.js

+ 1 - 1
select2.js

@@ -1033,7 +1033,7 @@
                         return matches[1];
                 }
             }
-            return this.opts.element.width() + 'px';
+            return (this.opts.element.width() === 0 ? 'auto' : this.opts.element.width() + 'px');
         }
     });