mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-07 09:26:06 +08:00
fix: limit input class due to rc-input won't override input class (#34294)
* fix: limit input class due to rc-input won't override input class * fix: add feedback into affix judgement
This commit is contained in:
parent
03d8556d8c
commit
5d51e8b5b4
@ -196,6 +196,8 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
|
||||
</>
|
||||
);
|
||||
|
||||
const withPrefixSuffix = hasPrefixSuffix(props) || hasFeedback;
|
||||
|
||||
return (
|
||||
<RcInput
|
||||
ref={composeRef(ref, inputRef)}
|
||||
@ -207,13 +209,13 @@ const Input = forwardRef<InputRef, InputProps>((props, ref) => {
|
||||
suffix={suffixNode}
|
||||
clearIcon={<CloseCircleFilled />}
|
||||
inputClassName={classNames(
|
||||
{
|
||||
!withPrefixSuffix && {
|
||||
[`${prefixCls}-sm`]: mergedSize === 'small',
|
||||
[`${prefixCls}-lg`]: mergedSize === 'large',
|
||||
[`${prefixCls}-rtl`]: direction === 'rtl',
|
||||
[`${prefixCls}-borderless`]: !bordered,
|
||||
},
|
||||
getStatusClassNames(prefixCls, mergedStatus),
|
||||
!withPrefixSuffix && getStatusClassNames(prefixCls, mergedStatus),
|
||||
)}
|
||||
affixWrapperClassName={classNames(
|
||||
{
|
||||
|
@ -129,7 +129,7 @@
|
||||
"rc-dropdown": "~3.3.2",
|
||||
"rc-field-form": "~1.23.0",
|
||||
"rc-image": "~5.2.5",
|
||||
"rc-input": "^0.0.1-alpha.3",
|
||||
"rc-input": "^0.0.1-alpha.4",
|
||||
"rc-input-number": "~7.3.0",
|
||||
"rc-mentions": "~1.6.1",
|
||||
"rc-menu": "~9.2.1",
|
||||
|
Loading…
Reference in New Issue
Block a user