diff --git a/components/table/demo/virtual-list.md b/components/table/demo/virtual-list.md index bd8fd8335e..36b9da2053 100644 --- a/components/table/demo/virtual-list.md +++ b/components/table/demo/virtual-list.md @@ -14,13 +14,14 @@ title: Integrate virtual scroll with `react-window` to achieve a high performance table of 100,000 data. ```tsx -import { Table } from 'antd'; +import { Table } from 'antd'; +import type { TableProps } from 'antd'; import classNames from 'classnames'; import ResizeObserver from 'rc-resize-observer'; import React, { useEffect, useRef, useState } from 'react'; import { VariableSizeGrid as Grid } from 'react-window'; -const VirtualTable = (props: Parameters[0]) => { +const VirtualTable = (props: TableProps) => { const { columns, scroll } = props; const [tableWidth, setTableWidth] = useState(0);