ant-design/components/table/RcTable/index.tsx
lijianan 857ee24e38
type(Table): TypeScript improvement (#50351)
* type: Table TypeScript improvement

* type: Table TypeScript improvement

* type: Table TypeScript improvement

* fix: fix demo

* fix: fix demo

* fix: fix type

* fix: fix type

* fix: fix type

* fix: fix type
2024-08-11 10:58:13 +08:00

16 lines
537 B
TypeScript

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