2023-08-28 17:36:23 +08:00
|
|
|
import { genVirtualTable } from 'rc-table';
|
2024-04-08 14:04:08 +08:00
|
|
|
|
2024-08-11 10:58:13 +08:00
|
|
|
import type { AnyObject } from '../../_util/type';
|
2023-08-28 17:36:23 +08:00
|
|
|
import type { InternalTableProps } from '../InternalTable';
|
2023-01-07 21:21:52 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Same as `rc-table` but we modify trigger children update logic instead.
|
|
|
|
*/
|
2024-08-11 10:58:13 +08:00
|
|
|
const RcVirtualTable = genVirtualTable((prev, next) => {
|
|
|
|
const { _renderTimes: prevRenderTimes } = prev as Readonly<InternalTableProps<AnyObject>>;
|
|
|
|
const { _renderTimes: nextRenderTimes } = next as Readonly<InternalTableProps<AnyObject>>;
|
2023-01-07 21:21:52 +08:00
|
|
|
return prevRenderTimes !== nextRenderTimes;
|
|
|
|
});
|
2024-08-11 10:58:13 +08:00
|
|
|
|
|
|
|
export default RcVirtualTable;
|