-
- Card content
+
+ Card content
+
diff --git a/components/list/demo/grid-test.md b/components/list/demo/grid-test.md
new file mode 100644
index 000000000000..c004406fc40b
--- /dev/null
+++ b/components/list/demo/grid-test.md
@@ -0,0 +1,78 @@
+---
+order: 4.1
+title:
+ zh-CN: 测试栅格列表
+ en-US: Test Grid
+debug: true
+---
+
+## zh-CN
+
+List `grid` 在各种情况下的样式表现,如 Fragment 和封装了 List.Item.
+
+## en-US
+
+Test List `grid` for some edge cases.
+
+```jsx
+import { List, Card } from 'antd';
+
+const data = [
+ {
+ title: 'Title 1',
+ },
+ {
+ title: 'Title 2',
+ },
+ {
+ title: 'Title 3',
+ },
+ {
+ title: 'Title 4',
+ },
+ {
+ title: 'Title 5',
+ },
+ {
+ title: 'Title 6',
+ },
+];
+
+const ListItem = () => (
+
+ Card content
+
+);
+
+ReactDOM.render(
+ <>
+
(
+ <>
+
+ Card content
+
+ >
+ )}
+ />
+ }
+ />
+ (
+ <>
+
+
+ >
+ )}
+ />
+ >,
+ mountNode,
+);
+```
diff --git a/components/list/index.tsx b/components/list/index.tsx
index 541e82abb329..1fd83546ee5b 100644
--- a/components/list/index.tsx
+++ b/components/list/index.tsx
@@ -7,7 +7,6 @@ import { RenderEmptyHandler, ConfigContext } from '../config-provider';
import Pagination, { PaginationConfig } from '../pagination';
import { Row } from '../grid';
import Item from './Item';
-import { cloneElement } from '../_util/reactNode';
export { ListItemProps, ListItemMetaProps } from './Item';
@@ -249,23 +248,15 @@ function List({
let childrenContent = isLoading && ;
if (splitDataSource.length > 0) {
const items = splitDataSource.map((item: any, index: number) => renderInnerItem(item, index));
- const childrenList = React.Children.map(items, (child: any, index) =>
- cloneElement(
- child,
- grid
- ? {
- key: keys[index],
- colStyle,
- }
- : {
- key: keys[index],
- },
- ),
- );
+ const childrenList = React.Children.map(items, (child: any, index) => (
+
+ {child}
+
+ ));
childrenContent = grid ? (
{childrenList}
) : (
-
+
);
} else if (!children && !isLoading) {
childrenContent = renderEmptyFunc(prefixCls, renderEmpty);