material-react-table 0.8.7 → 0.8.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,46 +1,60 @@
1
1
  # Material React Table
2
2
 
3
- > This Project is based on react-table v8, which itself is still in alpha, and therefore this package is also still in alpha
3
+ <a href="https://bundlephobia.com/result?p=material-react-table" target="\_parent">
4
+ <img alt="" src="https://badgen.net/bundlephobia/minzip/material-react-table" />
5
+ </a>
4
6
 
5
- - A fully featured Material UI v5 implementation of Tanstack react-table v8 (alpha)
7
+ <a href="https://npmjs.com/package/material-react-table" target="\_parent">
8
+ <img alt="" src="https://img.shields.io/npm/dm/material-react-table.svg" />
9
+ </a>
10
+
11
+ > This Project is based on `@tanstack/react-table` v8, which itself is still in beta, so therefore this package is also still in alpha/beta
12
+
13
+ - A fully featured Material UI V5 implementation of Tanstack React Table v8 (beta)
6
14
  - Inspired by material-table and the MUI X DataGrid
7
15
  - Written from the ground up in TypeScript, Material UI, and React Table
8
16
  - All internal Material UI components are easily customizable
9
17
 
10
- ## This project is in alpha, but feel free to install and explore
18
+ ## This project is in alpha, but will go into beta _soon<sup>TM</sup>_, so feel free to install and explore
11
19
 
12
20
  View the [docs (alpha) site](https://www.material-react-table.com/)
13
21
 
22
+ View a basic [example](https://codesandbox.io/s/github/KevinVandy/material-react-table/tree/main/material-react-table-docs/examples/basic/sandbox)
23
+
14
24
  View additional [storybook examples](https://www.material-react-table.dev/)
15
25
 
16
26
  View the [github source code](https://github.com/KevinVandy/material-react-table) and [github open issues](https://github.com/KevinVandy/material-react-table/issues)
17
27
 
18
28
  Join the [discord](https://discord.gg/5wqyRx6fnm) server to join in on the development discussion or ask questions
19
29
 
20
- ### Features (Some Still In Active Development)
30
+ ### Features (Some still being polished, but all are functional!)
21
31
 
22
32
  - [x] Click To Copy Cell Values
23
33
  - [x] Column Actions
24
- - [x] Column Hiding
25
34
  - [x] Column Grouping (Group By and Aggregates)
26
- - [x] Column Ordering (react-dnd)
35
+ - [x] Column Hiding
36
+ - [x] Column Ordering via Drag'n'Drop (react-dnd)
27
37
  - [x] Column Pinning
28
38
  - [x] Column Resizing (work in progress)
29
- - [x] Custom Icons
30
- - [x] Custom Styling and internal Mui Components
31
- - [x] Data Editing
39
+ - [x] Customize Icons
40
+ - [x] Customize Styling of internal Mui Components
41
+ - [x] Data Editing (3 different editing modes)
32
42
  - [x] Dense Padding Toggle
43
+ - [x] Detail Panels
33
44
  - [x] Filtering and multiple built-in filter modes
34
- - [x] Fullscreen
35
- - [x] Global Filtering (Search)
36
- - [x] HeaderGroups
37
- - [x] Localization i18n
45
+ - [x] Fullscreen mode
46
+ - [x] Global Filtering (Search across all columns, rank by best match)
47
+ - [x] HeaderGroups & Footers
48
+ - [x] Localization (i18n) support
49
+ - [x] Manage your own state
38
50
  - [x] Pagination (supports client-side and server-side)
51
+ - [x] Persistent State
39
52
  - [x] Row Actions
40
- - [x] Row Selection
53
+ - [x] Row Selection (checkboxes)
41
54
  - [x] SSR compatible
42
55
  - [x] Sorting
43
- - [x] Toolbars
56
+ - [x] Theming (Respects your Material UI Theme)
57
+ - [x] Toolbars (Add your own action buttons)
44
58
  - [x] Tree Data / Expanding Subrows
45
59
  - [ ] Virtualization (planned)
46
60
 
@@ -61,7 +61,7 @@ export declare type MRT_TableState<D extends Record<string, any> = {}> = Omit<Ta
61
61
  showProgressBars: boolean;
62
62
  showSkeletons: boolean;
63
63
  };
64
- export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<ColumnDef<D>, 'header' | 'footer' | 'columns' | 'filterFn'> & {
64
+ export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<ColumnDef<D>, 'accessorFN' | 'header' | 'footer' | 'columns' | 'filterFn'> & {
65
65
  Edit?: ({ cell, tableInstance, }: {
66
66
  cell: MRT_Cell<D>;
67
67
  tableInstance: MRT_TableInstance<D>;
@@ -70,19 +70,19 @@ export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<Col
70
70
  header: MRT_Header<D>;
71
71
  tableInstance: MRT_TableInstance<D>;
72
72
  }) => ReactNode;
73
- Footer?: ({ footer, tableInstance, }: {
73
+ Footer?: ReactNode | (({ footer, tableInstance, }: {
74
74
  footer: MRT_Header<D>;
75
75
  tableInstance: MRT_TableInstance<D>;
76
- }) => ReactNode;
77
- Header?: ({ header, tableInstance, }: {
76
+ }) => ReactNode);
77
+ Header?: ReactNode | (({ header, tableInstance, }: {
78
78
  header: MRT_Header<D>;
79
79
  tableInstance: MRT_TableInstance<D>;
80
- }) => ReactNode;
80
+ }) => ReactNode);
81
81
  Cell?: ({ cell, tableInstance, }: {
82
82
  cell: MRT_Cell<D>;
83
83
  tableInstance: MRT_TableInstance<D>;
84
84
  }) => ReactNode;
85
- id: keyof D | string;
85
+ accessorFN?: (row: D) => any;
86
86
  columns?: MRT_ColumnDef<D>[];
87
87
  enableClickToCopy?: boolean;
88
88
  enableColumnActions?: boolean;
@@ -96,6 +96,7 @@ export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<Col
96
96
  })[];
97
97
  footer?: string;
98
98
  header: string;
99
+ id: keyof D | string;
99
100
  muiTableBodyCellCopyButtonProps?: ButtonProps | (({ tableInstance, cell, }: {
100
101
  tableInstance: MRT_TableInstance;
101
102
  cell: MRT_Cell<D>;
@@ -140,7 +141,7 @@ export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<Col
140
141
  filterValue: any;
141
142
  }) => void;
142
143
  };
143
- export declare type MRT_Column<D extends Record<string, any> = {}> = Omit<Column<D>, 'header' | 'footer' | 'columns'> & MRT_ColumnDef<D> & {
144
+ export declare type MRT_Column<D extends Record<string, any> = {}> = Omit<Column<D>, 'header' | 'footer' | 'columns'> & {
144
145
  columns?: MRT_Column<D>[];
145
146
  columnDef: MRT_ColumnDef<D>;
146
147
  header: string;
@@ -152,11 +153,12 @@ export declare type MRT_Header<D extends Record<string, any> = {}> = Omit<Header
152
153
  export declare type MRT_HeaderGroup<D extends Record<string, any> = {}> = Omit<HeaderGroup<D>, 'headers'> & {
153
154
  headers: MRT_Header<D>[];
154
155
  };
155
- export declare type MRT_Row<D extends Record<string, any> = {}> = Omit<Row<D>, 'getVisibleCells' | 'getAllCells' | 'subRows' | 'original'> & {
156
+ export declare type MRT_Row<D extends Record<string, any> = {}> = Omit<Row<D>, 'getVisibleCells' | 'getAllCells' | 'subRows' | 'original' | '_valuesCache'> & {
156
157
  getAllCells: () => MRT_Cell<D>[];
157
158
  getVisibleCells: () => MRT_Cell<D>[];
158
159
  subRows?: MRT_Row<D>[];
159
160
  original: D;
161
+ _valuesCache?: D;
160
162
  };
161
163
  export declare type MRT_Cell<D extends Record<string, any> = {}> = Omit<Cell<D>, 'column' | 'row'> & {
162
164
  column: MRT_Column<D>;