material-react-table 2.0.0-beta.5 → 2.0.0-beta.6

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/dist/index.d.ts CHANGED
@@ -718,7 +718,7 @@ type MRT_TableOptions<TData extends MRT_RowData> = Omit<Partial<TableOptions<TDa
718
718
  row: MRT_Row<TData>;
719
719
  table: MRT_TableInstance<TData>;
720
720
  }) => TableCellProps) | TableCellProps;
721
- muiEditRowModalProps?: ((props: {
721
+ muiEditRowDialogProps?: ((props: {
722
722
  row: MRT_Row<TData>;
723
723
  table: MRT_TableInstance<TData>;
724
724
  }) => DialogProps) | DialogProps;
@@ -907,7 +907,7 @@ type MRT_TableOptions<TData extends MRT_RowData> = Omit<Partial<TableOptions<TDa
907
907
  onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
908
908
  table: MRT_TableInstance<TData>;
909
909
  }) => ReactNode[];
910
- renderCreateRowModalContent?: (props: {
910
+ renderCreateRowDialogContent?: (props: {
911
911
  internalEditComponents: ReactNode[];
912
912
  row: MRT_Row<TData>;
913
913
  table: MRT_TableInstance<TData>;
@@ -916,7 +916,7 @@ type MRT_TableOptions<TData extends MRT_RowData> = Omit<Partial<TableOptions<TDa
916
916
  row: MRT_Row<TData>;
917
917
  table: MRT_TableInstance<TData>;
918
918
  }) => ReactNode;
919
- renderEditRowModalContent?: (props: {
919
+ renderEditRowDialogContent?: (props: {
920
920
  internalEditComponents: ReactNode[];
921
921
  row: MRT_Row<TData>;
922
922
  table: MRT_TableInstance<TData>;
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "2.0.0-beta.5",
2
+ "version": "2.0.0-beta.6",
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.",
@@ -244,7 +244,8 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
244
244
  : columnDefType === 'display'
245
245
  ? '1rem 1.25rem'
246
246
  : '1.5rem',
247
- pl:
247
+ textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined,
248
+ [theme.direction === 'rtl' ? 'pr' : 'pl']:
248
249
  column.id === 'mrt-row-expand'
249
250
  ? `${
250
251
  row.depth +
@@ -255,7 +256,6 @@ export const MRT_TableBodyCell = <TData extends MRT_RowData>({
255
256
  : 1.25)
256
257
  }rem`
257
258
  : undefined,
258
- textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined,
259
259
  whiteSpace:
260
260
  row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal',
261
261
  zIndex:
@@ -123,7 +123,7 @@ export const MRT_TableBodyRow = <TData extends MRT_RowData>({
123
123
  baseBackgroundColor,
124
124
  pinnedRowBackgroundColor,
125
125
  selectedRowBackgroundColor,
126
- } = getMRTTheme(table, theme)
126
+ } = getMRTTheme(table, theme);
127
127
 
128
128
  return (
129
129
  <>
@@ -139,10 +139,6 @@ export const MRT_EditCellTextField = <TData extends MRT_RowData>({
139
139
  }}
140
140
  inputProps={{
141
141
  autoComplete: 'new-password', // disable autocomplete and autofill
142
- sx: {
143
- p: 0,
144
- ...textFieldProps?.inputProps?.sx,
145
- },
146
142
  ...textFieldProps.inputProps,
147
143
  }}
148
144
  onBlur={handleBlur}
@@ -27,11 +27,11 @@ export const MRT_EditRowModal = <TData extends MRT_RowData>({
27
27
  options: {
28
28
  localization,
29
29
  muiCreateRowModalProps,
30
- muiEditRowModalProps,
30
+ muiEditRowDialogProps,
31
31
  onCreatingRowCancel,
32
32
  onEditingRowCancel,
33
- renderCreateRowModalContent,
34
- renderEditRowModalContent,
33
+ renderCreateRowDialogContent,
34
+ renderEditRowDialogContent,
35
35
  },
36
36
  setCreatingRow,
37
37
  setEditingRow,
@@ -40,7 +40,7 @@ export const MRT_EditRowModal = <TData extends MRT_RowData>({
40
40
  const row = (creatingRow ?? editingRow) as MRT_Row<TData>;
41
41
 
42
42
  const dialogProps = {
43
- ...parseFromValuesOrFunc(muiEditRowModalProps, { row, table }),
43
+ ...parseFromValuesOrFunc(muiEditRowDialogProps, { row, table }),
44
44
  ...(creatingRow &&
45
45
  parseFromValuesOrFunc(muiCreateRowModalProps, { row, table })),
46
46
  ...rest,
@@ -76,12 +76,12 @@ export const MRT_EditRowModal = <TData extends MRT_RowData>({
76
76
  {...dialogProps}
77
77
  >
78
78
  {((creatingRow &&
79
- renderCreateRowModalContent?.({
79
+ renderCreateRowDialogContent?.({
80
80
  internalEditComponents,
81
81
  row,
82
82
  table,
83
83
  })) ||
84
- renderEditRowModalContent?.({
84
+ renderEditRowDialogContent?.({
85
85
  internalEditComponents,
86
86
  row,
87
87
  table,
package/src/types.ts CHANGED
@@ -816,7 +816,7 @@ export type MRT_TableOptions<TData extends MRT_RowData> = Omit<
816
816
  table: MRT_TableInstance<TData>;
817
817
  }) => TableCellProps)
818
818
  | TableCellProps;
819
- muiEditRowModalProps?:
819
+ muiEditRowDialogProps?:
820
820
  | ((props: {
821
821
  row: MRT_Row<TData>;
822
822
  table: MRT_TableInstance<TData>;
@@ -1043,7 +1043,7 @@ export type MRT_TableOptions<TData extends MRT_RowData> = Omit<
1043
1043
  onSelectFilterMode: (filterMode: MRT_FilterOption) => void;
1044
1044
  table: MRT_TableInstance<TData>;
1045
1045
  }) => ReactNode[];
1046
- renderCreateRowModalContent?: (props: {
1046
+ renderCreateRowDialogContent?: (props: {
1047
1047
  internalEditComponents: ReactNode[];
1048
1048
  row: MRT_Row<TData>;
1049
1049
  table: MRT_TableInstance<TData>;
@@ -1052,7 +1052,7 @@ export type MRT_TableOptions<TData extends MRT_RowData> = Omit<
1052
1052
  row: MRT_Row<TData>;
1053
1053
  table: MRT_TableInstance<TData>;
1054
1054
  }) => ReactNode;
1055
- renderEditRowModalContent?: (props: {
1055
+ renderEditRowDialogContent?: (props: {
1056
1056
  internalEditComponents: ReactNode[];
1057
1057
  row: MRT_Row<TData>;
1058
1058
  table: MRT_TableInstance<TData>;