diff --git a/components/input/style/index.ts b/components/input/style/index.ts index 20dc670845..e985932ad6 100644 --- a/components/input/style/index.ts +++ b/components/input/style/index.ts @@ -642,6 +642,14 @@ const genGroupStyle: GenerateStyle = (token: InputToken) => { borderEndEndRadius: 0, }, }, + // Fix the issue of input use `addonAfter` param in space compact mode + // https://github.com/ant-design/ant-design/issues/52483 + [`&:not(${componentCls}-compact-first-item)${componentCls}-compact-item`]: { + [`${componentCls}-affix-wrapper`]: { + borderStartStartRadius: 0, + borderEndStartRadius: 0, + }, + }, }, }, }; diff --git a/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap b/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap index 7b08b51f87..f421530071 100644 --- a/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap +++ b/components/space/__tests__/__snapshots__/demo-extend.test.ts.snap @@ -9377,6 +9377,41 @@ exports[`renders components/space/demo/compact.tsx extend context correctly 1`] +
+
+ + + + + + $ + + + +
+
`; diff --git a/components/space/__tests__/__snapshots__/demo.test.tsx.snap b/components/space/__tests__/__snapshots__/demo.test.tsx.snap index a48bc8e107..d10a4b0ed1 100644 --- a/components/space/__tests__/__snapshots__/demo.test.tsx.snap +++ b/components/space/__tests__/__snapshots__/demo.test.tsx.snap @@ -2037,6 +2037,41 @@ exports[`renders components/space/demo/compact.tsx correctly 1`] = ` +
+
+ + + + + + $ + + + +
+
`; diff --git a/components/space/demo/compact.tsx b/components/space/demo/compact.tsx index a33f7e5db0..f4a54bf188 100644 --- a/components/space/demo/compact.tsx +++ b/components/space/demo/compact.tsx @@ -202,6 +202,10 @@ const App: React.FC = () => ( + + + + );