mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 03:22:59 +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,
|
prefixCls, inputPrefixCls, children, placeholder, size, disabled,
|
||||||
className, style, allowClear, showSearch = false, ...otherProps
|
className, style, allowClear, showSearch = false, ...otherProps
|
||||||
} = props;
|
} = props;
|
||||||
const value = state.value;
|
const { value, inputFocused } = state;
|
||||||
|
|
||||||
const sizeCls = classNames({
|
const sizeCls = classNames({
|
||||||
[`${inputPrefixCls}-lg`]: size === 'large',
|
[`${inputPrefixCls}-lg`]: size === 'large',
|
||||||
@ -364,6 +364,7 @@ export default class Cascader extends React.Component<CascaderProps, CascaderSta
|
|||||||
[`${prefixCls}-picker-disabled`]: disabled,
|
[`${prefixCls}-picker-disabled`]: disabled,
|
||||||
[`${prefixCls}-picker-${size}`]: !!size,
|
[`${prefixCls}-picker-${size}`]: !!size,
|
||||||
[`${prefixCls}-picker-show-search`]: !!showSearch,
|
[`${prefixCls}-picker-show-search`]: !!showSearch,
|
||||||
|
[`${prefixCls}-picker-focused`]: inputFocused,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fix bug of https://github.com/facebook/react/pull/5004
|
// Fix bug of https://github.com/facebook/react/pull/5004
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
background-color: @component-background;
|
background-color: @component-background;
|
||||||
border-radius: @border-radius-base;
|
border-radius: @border-radius-base;
|
||||||
outline: 0;
|
outline: 0;
|
||||||
|
transition: color .3s;
|
||||||
|
|
||||||
&-with-value &-label {
|
&-with-value &-label {
|
||||||
color: transparent;
|
color: transparent;
|
||||||
@ -46,6 +47,10 @@
|
|||||||
.active;
|
.active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&-show-search&-focused {
|
||||||
|
color: @disabled-color;
|
||||||
|
}
|
||||||
|
|
||||||
&-label {
|
&-label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user