From e40b02b544dc62a1cb086552108d2b3083a388a8 Mon Sep 17 00:00:00 2001 From: afc163 Date: Fri, 29 Oct 2021 15:56:41 +0800 Subject: [PATCH] docs: fix List demo close #32685 --- components/list/demo/loadmore.md | 34 ++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/components/list/demo/loadmore.md b/components/list/demo/loadmore.md index eeb6d4bb37..86e76afe7c 100644 --- a/components/list/demo/loadmore.md +++ b/components/list/demo/loadmore.md @@ -53,7 +53,9 @@ class LoadMoreList extends React.Component { onLoadMore = () => { this.setState({ loading: true, - list: this.state.data.concat([...new Array(count)].map(() => ({ loading: true, name: {} }))), + list: this.state.data.concat( + [...new Array(count)].map(() => ({ loading: true, name: {}, picture: {} })), + ), }); this.getData(res => { const data = this.state.data.concat(res.results); @@ -96,20 +98,22 @@ class LoadMoreList extends React.Component { itemLayout="horizontal" loadMore={loadMore} dataSource={list} - renderItem={item => ( - edit, more]} - > - - } - title={{item.name.last}} - description="Ant Design, a design language for background applications, is refined by Ant UED Team" - /> -
content
-
-
- )} + renderItem={item => + console.log(item) || ( + edit, more]} + > + + } + title={{item.name.last}} + description="Ant Design, a design language for background applications, is refined by Ant UED Team" + /> +
content
+
+
+ ) + } /> ); }