From 4d098e780362b94eee58ba66da94020d660493a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8C=E8=B4=A7=E6=9C=BA=E5=99=A8=E4=BA=BA?= Date: Thu, 17 Sep 2020 16:05:08 +0800 Subject: [PATCH] docs: Update virtual list demo (#26786) --- components/table/demo/virtual-list.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/table/demo/virtual-list.md b/components/table/demo/virtual-list.md index bf87ea2443..b0ac712144 100644 --- a/components/table/demo/virtual-list.md +++ b/components/table/demo/virtual-list.md @@ -62,6 +62,7 @@ function VirtualTable(props) { const renderVirtualList = (rawData: object[], { scrollbarSize, ref, onScroll }: any) => { ref.current = connectObject; + const totalHeight = rawData.length * 54; return ( { const { width } = mergedColumns[index]; - return index === mergedColumns.length - 1 ? width - scrollbarSize - 1 : width; + return totalHeight > scroll.y && index === mergedColumns.length - 1 + ? width - scrollbarSize - 1 + : width; }} height={scroll.y} rowCount={rawData.length}