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