index.d.ts 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import * as React from 'react';
  2. import type { AlignType, CellEllipsisType, ColumnType, CustomizeComponent, DataIndex, DefaultRecordType, ScopeType } from '../interface';
  3. export interface CellProps<RecordType extends DefaultRecordType> {
  4. prefixCls?: string;
  5. className?: string;
  6. record?: RecordType;
  7. /** `column` index is the real show rowIndex */
  8. index?: number;
  9. /** the index of the record. For the render(value, record, renderIndex) */
  10. renderIndex?: number;
  11. dataIndex?: DataIndex<RecordType>;
  12. render?: ColumnType<RecordType>['render'];
  13. component?: CustomizeComponent;
  14. children?: React.ReactNode;
  15. colSpan?: number;
  16. rowSpan?: number;
  17. scope?: ScopeType;
  18. ellipsis?: CellEllipsisType;
  19. align?: AlignType;
  20. shouldCellUpdate?: (record: RecordType, prevRecord: RecordType) => boolean;
  21. fixLeft?: number | false;
  22. fixRight?: number | false;
  23. firstFixLeft?: boolean;
  24. lastFixLeft?: boolean;
  25. firstFixRight?: boolean;
  26. lastFixRight?: boolean;
  27. allColsFixedLeft?: boolean;
  28. /** @private Used for `expandable` with nest tree */
  29. appendNode?: React.ReactNode;
  30. additionalProps?: React.TdHTMLAttributes<HTMLTableCellElement>;
  31. rowType?: 'header' | 'body' | 'footer';
  32. isSticky?: boolean;
  33. }
  34. declare function Cell<RecordType>(props: CellProps<RecordType>): React.JSX.Element;
  35. declare const _default: typeof Cell;
  36. export default _default;