Skip to content

Commit

Permalink
fix(Select): bug of autoWidth
Browse files Browse the repository at this point in the history
  • Loading branch information
潕量 committed Nov 22, 2018
1 parent 5c677f2 commit 829f53b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/select/base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ export default class Base extends React.Component {
syncWidth() {
const width = dom.getStyle(this.selectDOM, 'width');

if (this.props.autoWidth && width && (this.width !== width)) {
if (width && (this.width !== width)) {
this.width = width;

if (this.popupRef) {
if (this.popupRef && this.props.autoWidth) {
// overy 的 node 节点可能没有挂载完成,所以这里需要异步
setTimeout(() => {
if (this.popupRef && this.popupRef.getInstance().overlay) {
Expand Down

0 comments on commit 829f53b

Please sign in to comment.