Skip to content

Commit

Permalink
consider clear style
Browse files Browse the repository at this point in the history
  • Loading branch information
yiminghe committed Apr 20, 2016
1 parent 38af74e commit 1f816aa
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions assets/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rc-select",
"version": "6.2.0",
"version": "6.2.1",
"description": "React Select",
"keywords": [
"react",
Expand Down
3 changes: 2 additions & 1 deletion src/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand Down Expand Up @@ -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 = (<span
Expand Down

0 comments on commit 1f816aa

Please sign in to comment.