diff --git a/components/list/demo/virtual-list.tsx b/components/list/demo/virtual-list.tsx index d81465c024..a4fd604d1f 100644 --- a/components/list/demo/virtual-list.tsx +++ b/components/list/demo/virtual-list.tsx @@ -25,17 +25,17 @@ const ContainerHeight = 400; const App: React.FC = () => { const [data, setData] = useState([]); - const appendData = () => { + const appendData = (showMessage = true) => { fetch(fakeDataUrl) .then((res) => res.json()) .then((body) => { setData(data.concat(body.results)); - message.success(`${body.results.length} more items loaded!`); + showMessage && message.success(`${body.results.length} more items loaded!`); }); }; useEffect(() => { - appendData(); + appendData(false); }, []); const onScroll = (e: React.UIEvent) => {