material-react-table 0.21.0 → 0.22.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,8 @@
1
- import { FC, RefObject } from 'react';
2
- import type { MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, RefObject, SetStateAction } from 'react';
2
+ import type { MRT_Column, MRT_TableInstance } from '..';
3
3
  interface Props {
4
4
  table: MRT_TableInstance;
5
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
5
6
  tableContainerRef: RefObject<HTMLDivElement>;
6
7
  }
7
8
  export declare const MRT_TableBody: FC<Props>;
@@ -1,9 +1,10 @@
1
- import { FC } from 'react';
2
- import type { MRT_Cell, MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, SetStateAction } from 'react';
2
+ import type { MRT_Cell, MRT_Column, MRT_TableInstance } from '..';
3
3
  interface Props {
4
4
  cell: MRT_Cell;
5
5
  enableHover?: boolean;
6
6
  rowIndex: number;
7
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
7
8
  table: MRT_TableInstance;
8
9
  }
9
10
  export declare const MRT_TableBodyCell: FC<Props>;
@@ -1,8 +1,9 @@
1
- import { FC } from 'react';
2
- import type { MRT_Row, MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, SetStateAction } from 'react';
2
+ import type { MRT_Column, MRT_Row, MRT_TableInstance } from '..';
3
3
  interface Props {
4
4
  row: MRT_Row;
5
5
  rowIndex: number;
6
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
6
7
  table: MRT_TableInstance;
7
8
  }
8
9
  export declare const MRT_TableBodyRow: FC<Props>;
@@ -1,7 +1,8 @@
1
- import { FC, Ref } from 'react';
1
+ import { DragEventHandler, FC } from 'react';
2
2
  import { MRT_TableInstance } from '..';
3
3
  interface Props {
4
- ref: Ref<HTMLButtonElement>;
4
+ handleDragStart: DragEventHandler<HTMLButtonElement>;
5
+ handleDragEnd: DragEventHandler<HTMLButtonElement>;
5
6
  table: MRT_TableInstance;
6
7
  }
7
8
  export declare const MRT_GrabHandleButton: FC<Props>;
@@ -1,6 +1,8 @@
1
- import { FC } from 'react';
2
- import type { MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, SetStateAction } from 'react';
2
+ import type { MRT_Column, MRT_TableInstance } from '..';
3
3
  interface Props {
4
+ currentHoveredColumn: MRT_Column | null;
5
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
4
6
  table: MRT_TableInstance;
5
7
  }
6
8
  export declare const MRT_TableHead: FC<Props>;
@@ -1,12 +1,10 @@
1
- import { FC, Ref } from 'react';
2
- import type { MRT_Header, MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, SetStateAction } from 'react';
2
+ import type { MRT_Column, MRT_Header, MRT_TableInstance } from '..';
3
3
  interface Props {
4
- dragRef?: Ref<HTMLButtonElement>;
5
- dropRef?: Ref<HTMLDivElement>;
4
+ currentHoveredColumn: MRT_Column | null;
5
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
6
6
  header: MRT_Header;
7
7
  table: MRT_TableInstance;
8
- isDragging?: boolean;
9
- previewRef?: Ref<HTMLTableCellElement>;
10
8
  }
11
9
  export declare const MRT_TableHeadCell: FC<Props>;
12
10
  export {};
@@ -1,6 +1,8 @@
1
- import { FC } from 'react';
2
- import type { MRT_HeaderGroup, MRT_TableInstance } from '..';
1
+ import { Dispatch, FC, SetStateAction } from 'react';
2
+ import type { MRT_Column, MRT_HeaderGroup, MRT_TableInstance } from '..';
3
3
  interface Props {
4
+ currentHoveredColumn: MRT_Column | null;
5
+ setCurrentHoveredColumn: Dispatch<SetStateAction<MRT_Column | null>>;
4
6
  headerGroup: MRT_HeaderGroup;
5
7
  table: MRT_TableInstance;
6
8
  }