未验证 提交 fec45cb6 编写于 作者: 二货机器人 提交者: GitHub

docs: Update virtual list demo (#26786)

上级 8bff5917
......@@ -62,6 +62,7 @@ function VirtualTable(props) {
const renderVirtualList = (rawData: object[], { scrollbarSize, ref, onScroll }: any) => {
ref.current = connectObject;
const totalHeight = rawData.length * 54;
return (
<Grid
......@@ -70,7 +71,9 @@ function VirtualTable(props) {
columnCount={mergedColumns.length}
columnWidth={index => {
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}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册