diff --git a/assets/index.less b/assets/index.less index cbda23111..21fc7a3a3 100644 --- a/assets/index.less +++ b/assets/index.less @@ -14,6 +14,12 @@ color: #666; line-height: 28px; + &-allow-clear { + .@{selectPrefixCls}-selection--single .@{selectPrefixCls}-selection__rendered { + padding-right: 40px; + } + } + ul, li { margin: 0; padding: 0; diff --git a/package.json b/package.json index 933536331..6ad4aae74 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rc-select", - "version": "6.2.0", + "version": "6.2.1", "description": "React Select", "keywords": [ "react", diff --git a/src/Select.jsx b/src/Select.jsx index e13b06d97..be5f205c9 100644 --- a/src/Select.jsx +++ b/src/Select.jsx @@ -124,7 +124,7 @@ const Select = React.createClass({ componentDidUpdate() { const { state, props } = this; - if (state.open && (isMultipleOrTags(props) || props.showSearch)) { + if (state.open && isMultipleOrTags(props)) { const inputNode = this.getInputDOMNode(); if (inputNode.value) { inputNode.style.width = ''; @@ -658,6 +658,7 @@ const Select = React.createClass({ [`${prefixCls}-combobox`]: isCombobox(props), [`${prefixCls}-disabled`]: disabled, [`${prefixCls}-enabled`]: !disabled, + [`${prefixCls}-allow-clear`]: !!props.allowClear, }; const clear = (