Select multiple mode support showArrow (#15091)

* support showArrow

* fix rc-select version

* update snapshot
This commit is contained in:
zombieJ 2019-02-28 12:26:43 +08:00 committed by GitHub
parent d29e6675a5
commit acd06e9cb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 7 deletions

View File

@ -147,7 +147,7 @@ exports[`renders ./components/select/demo/basic.md correctly 1`] = `
</div>
</div>
<div
class="ant-select ant-select-enabled"
class="ant-select ant-select-enabled ant-select-loading"
style="width:120px"
>
<div

View File

@ -205,6 +205,7 @@ export default class Select<T = SelectValue> extends React.Component<SelectProps
removeIcon,
clearIcon,
menuItemSelectedIcon,
showArrow,
...restProps
} = this.props;
const rest = omit(restProps, ['inputIcon']);
@ -214,6 +215,7 @@ export default class Select<T = SelectValue> extends React.Component<SelectProps
{
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-show-arrow`]: showArrow,
},
className,
);
@ -262,6 +264,7 @@ export default class Select<T = SelectValue> extends React.Component<SelectProps
removeIcon={finalRemoveIcon}
clearIcon={finalClearIcon}
menuItemSelectedIcon={finalMenuItemSelectedIcon}
showArrow={showArrow}
{...rest}
{...modeConfig}
prefixCls={prefixCls}

View File

@ -182,7 +182,8 @@
line-height: @input-height-lg - 8px;
}
}
.@{select-prefix-cls}-selection__clear {
.@{select-prefix-cls}-selection__clear,
.@{select-prefix-cls}-arrow {
top: @input-height-lg / 2;
}
}
@ -204,7 +205,8 @@
line-height: @input-height-sm - 10px;
}
}
.@{select-prefix-cls}-selection__clear {
.@{select-prefix-cls}-selection__clear,
.@{select-prefix-cls}-arrow {
top: @input-height-sm / 2;
}
}
@ -364,7 +366,8 @@
}
}
.@{select-prefix-cls}-selection__clear {
.@{select-prefix-cls}-selection__clear,
.@{select-prefix-cls}-arrow {
top: @input-height-base / 2;
}
}
@ -373,7 +376,8 @@
padding-right: 16px;
}
&-allow-clear &-selection--multiple &-selection__rendered {
&-allow-clear &-selection--multiple &-selection__rendered,
&-show-arrow &-selection--multiple &-selection__rendered {
margin-right: 20px; // In case that clear button will overlap content
}
@ -410,7 +414,8 @@
transition: all 0.3s @ease-in-out, height 0s;
}
}
&-combobox&-allow-clear &-selection:hover &-selection__rendered {
&-combobox&-allow-clear &-selection:hover &-selection__rendered,
&-combobox&-show-arrow &-selection:hover &-selection__rendered {
margin-right: 20px; // In case that clear button will overlap content
}
}

View File

@ -71,7 +71,7 @@
"rc-pagination": "~1.17.7",
"rc-progress": "~2.3.0",
"rc-rate": "~2.5.0",
"rc-select": "~8.8.0",
"rc-select": "~9.0.0",
"rc-slider": "~8.6.5",
"rc-steps": "~3.3.0",
"rc-switch": "~1.9.0",