ant-design/components/table/RcTable.tsx
二货爱吃白萝卜 91df688efd
refactor: Table render logic opt (#40063)
* chore: basic prepare

* chore: adjust render logic

* chore: fix lint

* chore: bump table

* test: update snapshot
2023-01-07 21:21:52 +08:00

13 lines
427 B
TypeScript

import { genTable } from 'rc-table';
import type { InternalTableProps } from './InternalTable';
/**
* Same as `rc-table` but we modify trigger children update logic instead.
*/
export default genTable((prev, next) => {
const { _renderTimes: prevRenderTimes } = prev as InternalTableProps<any>;
const { _renderTimes: nextRenderTimes } = next as InternalTableProps<any>;
return prevRenderTimes !== nextRenderTimes;
});