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.
@@ -510,7 +510,7 @@ const MRT_CopyButton = (_a) => {
510
510
  };
511
511
 
512
512
  const MRT_EditCellTextField = (_a) => {
513
- var _b, _c, _d, _e;
513
+ var _b, _c, _d;
514
514
  var { cell, table } = _a, rest = __rest(_a, ["cell", "table"]);
515
515
  const { getState, options: { createDisplayMode, editDisplayMode, muiEditTextFieldProps }, refs: { editInputRefs }, setCreatingRow, setEditingCell, setEditingRow, } = table;
516
516
  const { column, row } = cell;
@@ -579,11 +579,11 @@ const MRT_EditCellTextField = (_a) => {
579
579
  : undefined, select: isSelectEdit, size: "small", value: value, variant: "standard" }, textFieldProps, { InputProps: Object.assign(Object.assign({ disableUnderline: editDisplayMode === 'table' }, textFieldProps.InputProps), { sx: (theme) => {
580
580
  var _a;
581
581
  return (Object.assign({ mb: 0 }, parseFromValuesOrFunc((_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.InputProps) === null || _a === void 0 ? void 0 : _a.sx, theme)));
582
- } }), inputProps: Object.assign({ autoComplete: 'new-password', sx: Object.assign({ p: 0 }, (_c = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.inputProps) === null || _c === void 0 ? void 0 : _c.sx) }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
582
+ } }), inputProps: Object.assign({ autoComplete: 'new-password' }, textFieldProps.inputProps), onBlur: handleBlur, onChange: handleChange, onClick: (e) => {
583
583
  var _a;
584
584
  e.stopPropagation();
585
585
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
586
- }, onKeyDown: handleEnterKeyDown, children: (_d = textFieldProps.children) !== null && _d !== void 0 ? _d : (_e = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _e === void 0 ? void 0 : _e.map((option) => {
586
+ }, onKeyDown: handleEnterKeyDown, children: (_c = textFieldProps.children) !== null && _c !== void 0 ? _c : (_d = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _d === void 0 ? void 0 : _d.map((option) => {
587
587
  let value;
588
588
  let text;
589
589
  if (typeof option !== 'object') {
@@ -732,14 +732,14 @@ const MRT_TableBodyCell = (_a) => {
732
732
  : '1rem'
733
733
  : columnDefType === 'display'
734
734
  ? '1rem 1.25rem'
735
- : '1.5rem', pl: column.id === 'mrt-row-expand'
735
+ : '1.5rem', textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, [theme.direction === 'rtl' ? 'pr' : 'pl']: column.id === 'mrt-row-expand'
736
736
  ? `${row.depth +
737
737
  (density === 'compact'
738
738
  ? 0.5
739
739
  : density === 'comfortable'
740
740
  ? 0.75
741
741
  : 1.25)}rem`
742
- : undefined, textOverflow: columnDefType !== 'display' ? 'ellipsis' : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 }, getCommonMRTCellStyles({
742
+ : undefined, whiteSpace: row.getIsPinned() || density === 'compact' ? 'nowrap' : 'normal', zIndex: (draggingColumn === null || draggingColumn === void 0 ? void 0 : draggingColumn.id) === column.id ? 2 : column.getIsPinned() ? 1 : 0 }, getCommonMRTCellStyles({
743
743
  column,
744
744
  table,
745
745
  tableCellProps,
@@ -2758,10 +2758,10 @@ const MRT_EditActionButtons = (_a) => {
2758
2758
  const MRT_EditRowModal = (_a) => {
2759
2759
  var _b;
2760
2760
  var { open, table } = _a, rest = __rest(_a, ["open", "table"]);
2761
- const { getState, options: { localization, muiCreateRowModalProps, muiEditRowModalProps, onCreatingRowCancel, onEditingRowCancel, renderCreateRowModalContent, renderEditRowModalContent, }, setCreatingRow, setEditingRow, } = table;
2761
+ const { getState, options: { localization, muiCreateRowModalProps, muiEditRowDialogProps, onCreatingRowCancel, onEditingRowCancel, renderCreateRowDialogContent, renderEditRowDialogContent, }, setCreatingRow, setEditingRow, } = table;
2762
2762
  const { creatingRow, editingRow } = getState();
2763
2763
  const row = (creatingRow !== null && creatingRow !== void 0 ? creatingRow : editingRow);
2764
- const dialogProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditRowModalProps, { row, table })), (creatingRow &&
2764
+ const dialogProps = Object.assign(Object.assign(Object.assign({}, parseFromValuesOrFunc(muiEditRowDialogProps, { row, table })), (creatingRow &&
2765
2765
  parseFromValuesOrFunc(muiCreateRowModalProps, { row, table }))), rest);
2766
2766
  const internalEditComponents = row
2767
2767
  .getAllCells()
@@ -2780,12 +2780,12 @@ const MRT_EditRowModal = (_a) => {
2780
2780
  row._valuesCache = {}; //reset values cache
2781
2781
  (_a = dialogProps.onClose) === null || _a === void 0 ? void 0 : _a.call(dialogProps, event, reason);
2782
2782
  }, open: open }, dialogProps, { children: (_b = ((creatingRow &&
2783
- (renderCreateRowModalContent === null || renderCreateRowModalContent === void 0 ? void 0 : renderCreateRowModalContent({
2783
+ (renderCreateRowDialogContent === null || renderCreateRowDialogContent === void 0 ? void 0 : renderCreateRowDialogContent({
2784
2784
  internalEditComponents,
2785
2785
  row,
2786
2786
  table,
2787
2787
  }))) ||
2788
- (renderEditRowModalContent === null || renderEditRowModalContent === void 0 ? void 0 : renderEditRowModalContent({
2788
+ (renderEditRowDialogContent === null || renderEditRowDialogContent === void 0 ? void 0 : renderEditRowDialogContent({
2789
2789
  internalEditComponents,
2790
2790
  row,
2791
2791
  table,