mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-08 01:53:34 +08:00
Selected value in Cascader should be gray when focus search input
This commit is contained in:
parent
4aabc53744
commit
cde8bc8361
@ -341,7 +341,7 @@ export default class Cascader extends React.Component<CascaderProps, CascaderSta
|
||||
prefixCls, inputPrefixCls, children, placeholder, size, disabled,
|
||||
className, style, allowClear, showSearch = false, ...otherProps
|
||||
} = props;
|
||||
const value = state.value;
|
||||
const { value, inputFocused } = state;
|
||||
|
||||
const sizeCls = classNames({
|
||||
[`${inputPrefixCls}-lg`]: size === 'large',
|
||||
@ -364,6 +364,7 @@ export default class Cascader extends React.Component<CascaderProps, CascaderSta
|
||||
[`${prefixCls}-picker-disabled`]: disabled,
|
||||
[`${prefixCls}-picker-${size}`]: !!size,
|
||||
[`${prefixCls}-picker-show-search`]: !!showSearch,
|
||||
[`${prefixCls}-picker-focused`]: inputFocused,
|
||||
});
|
||||
|
||||
// Fix bug of https://github.com/facebook/react/pull/5004
|
||||
|
@ -28,6 +28,7 @@
|
||||
background-color: @component-background;
|
||||
border-radius: @border-radius-base;
|
||||
outline: 0;
|
||||
transition: color .3s;
|
||||
|
||||
&-with-value &-label {
|
||||
color: transparent;
|
||||
@ -46,6 +47,10 @@
|
||||
.active;
|
||||
}
|
||||
|
||||
&-show-search&-focused {
|
||||
color: @disabled-color;
|
||||
}
|
||||
|
||||
&-label {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user