material-react-table 2.0.0-beta.13 → 2.0.0-beta.14

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.
@@ -1,5 +1,5 @@
1
1
  const MRT_Localization_ZH_HANS = {
2
- actions: '动作',
2
+ actions: '操作',
3
3
  and: '与',
4
4
  cancel: '取消',
5
5
  changeFilterMode: '更改过滤模式',
@@ -10,7 +10,7 @@ const MRT_Localization_ZH_HANS = {
10
10
  clickToCopy: '点击以复制',
11
11
  collapse: '折叠',
12
12
  collapseAll: '全部折叠',
13
- columnActions: '列动作',
13
+ columnActions: '列操作',
14
14
  copiedToClipboard: '已复制至剪贴板',
15
15
  dropToGroupBy: '拖放以按 {column} 分组',
16
16
  edit: '编辑',
@@ -62,7 +62,7 @@ const MRT_Localization_ZH_HANS = {
62
62
  pinToRight: '固定至右边',
63
63
  resetColumnSize: '重置列大小',
64
64
  resetOrder: '重置排序',
65
- rowActions: '行动作',
65
+ rowActions: '行操作',
66
66
  rowNumber: '#',
67
67
  rowNumbers: '行号码',
68
68
  rowsPerPage: '每页行数',
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const MRT_Localization_ZH_HANS = {
6
- actions: '动作',
6
+ actions: '操作',
7
7
  and: '与',
8
8
  cancel: '取消',
9
9
  changeFilterMode: '更改过滤模式',
@@ -14,7 +14,7 @@ const MRT_Localization_ZH_HANS = {
14
14
  clickToCopy: '点击以复制',
15
15
  collapse: '折叠',
16
16
  collapseAll: '全部折叠',
17
- columnActions: '列动作',
17
+ columnActions: '列操作',
18
18
  copiedToClipboard: '已复制至剪贴板',
19
19
  dropToGroupBy: '拖放以按 {column} 分组',
20
20
  edit: '编辑',
@@ -66,7 +66,7 @@ const MRT_Localization_ZH_HANS = {
66
66
  pinToRight: '固定至右边',
67
67
  resetColumnSize: '重置列大小',
68
68
  resetOrder: '重置排序',
69
- rowActions: '行动作',
69
+ rowActions: '行操作',
70
70
  rowNumber: '#',
71
71
  rowNumbers: '行号码',
72
72
  rowsPerPage: '每页行数',
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-beta.13",
2
+ "version": "2.0.0-beta.14",
3
3
  "license": "MIT",
4
4
  "name": "material-react-table",
5
5
  "description": "A fully featured Material UI V5 implementation of TanStack React Table V8, written from the ground up in TypeScript.",
@@ -0,0 +1,4 @@
1
+ export * from './useMRT_DisplayColumns';
2
+ export * from './useMRT_Effects';
3
+ export * from './useMRT_TableInstance';
4
+ export * from './useMRT_TableOptions';
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from './column.utils';
6
6
  export * from './filterFns';
7
7
  export * from './footer';
8
8
  export * from './head';
9
+ export * from './hooks';
9
10
  export * from './inputs';
10
11
  export * from './menus';
11
12
  export * from './modals';
@@ -62,9 +62,9 @@ export const MRT_EditCellTextField = <TData extends MRT_RowData>({
62
62
  //@ts-ignore
63
63
  row._valuesCache[column.id] = newValue;
64
64
  if (isCreating) {
65
- setCreatingRow({ ...row });
65
+ setCreatingRow(row);
66
66
  } else if (isEditing) {
67
- setEditingRow({ ...row });
67
+ setEditingRow(row);
68
68
  }
69
69
  };
70
70
 
@@ -1,7 +1,7 @@
1
1
  import { type MRT_Localization } from '..';
2
2
 
3
3
  export const MRT_Localization_ZH_HANS: MRT_Localization = {
4
- actions: '动作',
4
+ actions: '操作',
5
5
  and: '与',
6
6
  cancel: '取消',
7
7
  changeFilterMode: '更改过滤模式',
@@ -12,7 +12,7 @@ export const MRT_Localization_ZH_HANS: MRT_Localization = {
12
12
  clickToCopy: '点击以复制',
13
13
  collapse: '折叠',
14
14
  collapseAll: '全部折叠',
15
- columnActions: '列动作',
15
+ columnActions: '列操作',
16
16
  copiedToClipboard: '已复制至剪贴板',
17
17
  dropToGroupBy: '拖放以按 {column} 分组',
18
18
  edit: '编辑',
@@ -64,7 +64,7 @@ export const MRT_Localization_ZH_HANS: MRT_Localization = {
64
64
  pinToRight: '固定至右边',
65
65
  resetColumnSize: '重置列大小',
66
66
  resetOrder: '重置排序',
67
- rowActions: '行动作',
67
+ rowActions: '行操作',
68
68
  rowNumber: '#',
69
69
  rowNumbers: '行号码',
70
70
  rowsPerPage: '每页行数',
@@ -27,7 +27,7 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
27
27
  } = table;
28
28
  const { isFullScreen } = getState();
29
29
 
30
- const tablePaperProps = {
30
+ const paperProps = {
31
31
  ...parseFromValuesOrFunc(muiTablePaperProps, { table }),
32
32
  ...rest,
33
33
  };
@@ -35,12 +35,12 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
35
35
  return (
36
36
  <Paper
37
37
  elevation={2}
38
- {...tablePaperProps}
38
+ {...paperProps}
39
39
  ref={(ref: HTMLDivElement) => {
40
40
  tablePaperRef.current = ref;
41
- if (tablePaperProps?.ref) {
41
+ if (paperProps?.ref) {
42
42
  //@ts-ignore
43
- tablePaperProps.ref.current = ref;
43
+ paperProps.ref.current = ref;
44
44
  }
45
45
  }}
46
46
  style={{
@@ -60,14 +60,14 @@ export const MRT_TablePaper = <TData extends MRT_RowData>({
60
60
  zIndex: 999,
61
61
  }
62
62
  : {}),
63
- ...tablePaperProps?.style,
63
+ ...paperProps?.style,
64
64
  }}
65
65
  sx={(theme) => ({
66
66
  backgroundColor: getMRTTheme(table, theme).baseBackgroundColor,
67
67
  backgroundImage: 'unset',
68
68
  overflow: 'hidden',
69
69
  transition: 'all 100ms ease-in-out',
70
- ...(parseFromValuesOrFunc(tablePaperProps?.sx, theme) as any),
70
+ ...(parseFromValuesOrFunc(paperProps?.sx, theme) as any),
71
71
  })}
72
72
  >
73
73
  {enableTopToolbar &&