material-react-table 1.8.2 → 1.8.3

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
@@ -1567,7 +1567,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
1567
1567
  };
1568
1568
 
1569
1569
  const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1570
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
1570
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
1571
1571
  const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, manualFiltering, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
1572
1572
  const { column } = header;
1573
1573
  const { columnDef } = column;
@@ -1752,28 +1752,27 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
1752
1752
  ? textFieldProps.sx(theme)
1753
1753
  : textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))) }),
1754
1754
  (isSelectFilter || isMultiSelectFilter) && (React__default["default"].createElement(MenuItem__default["default"], { divider: true, disabled: true, hidden: true, value: "" },
1755
- React__default["default"].createElement(Box__default["default"], { sx: { opacity: 0.5 } }, filterPlaceholder))), (_k = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null || _k === void 0 ? void 0 :
1756
- _k.map((option) => {
1757
- var _a;
1758
- let value;
1759
- let text;
1760
- if (typeof option !== 'object') {
1761
- value = option;
1762
- text = option;
1763
- }
1764
- else {
1765
- value = option.value;
1766
- text = option.text;
1767
- }
1768
- return (React__default["default"].createElement(MenuItem__default["default"], { key: value, sx: {
1769
- display: 'flex',
1770
- m: 0,
1771
- alignItems: 'center',
1772
- gap: '0.5rem',
1773
- }, value: value },
1774
- isMultiSelectFilter && (React__default["default"].createElement(Checkbox__default["default"], { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })),
1775
- text));
1776
- })),
1755
+ React__default["default"].createElement(Box__default["default"], { sx: { opacity: 0.5 } }, filterPlaceholder))), (_k = textFieldProps.children) !== null && _k !== void 0 ? _k : (_l = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null || _l === void 0 ? void 0 : _l.map((option) => {
1756
+ var _a;
1757
+ let value;
1758
+ let text;
1759
+ if (typeof option !== 'object') {
1760
+ value = option;
1761
+ text = option;
1762
+ }
1763
+ else {
1764
+ value = option.value;
1765
+ text = option.text;
1766
+ }
1767
+ return (React__default["default"].createElement(MenuItem__default["default"], { key: value, sx: {
1768
+ display: 'flex',
1769
+ m: 0,
1770
+ alignItems: 'center',
1771
+ gap: '0.5rem',
1772
+ }, value: value },
1773
+ isMultiSelectFilter && (React__default["default"].createElement(Checkbox__default["default"], { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })),
1774
+ text));
1775
+ })),
1777
1776
  React__default["default"].createElement(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })));
1778
1777
  };
1779
1778
 
@@ -2129,7 +2128,7 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
2129
2128
  };
2130
2129
 
2131
2130
  const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2132
- var _a, _b;
2131
+ var _a, _b, _c;
2133
2132
  const { getState, options: { muiTableBodyCellEditTextFieldProps }, refs: { editInputRefs }, setEditingCell, setEditingRow, } = table;
2134
2133
  const { column, row } = cell;
2135
2134
  const { columnDef } = column;
@@ -2190,7 +2189,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
2190
2189
  var _a;
2191
2190
  e.stopPropagation();
2192
2191
  (_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
2193
- }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }), (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _b === void 0 ? void 0 : _b.map((option) => {
2192
+ }, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }), (_b = textFieldProps.children) !== null && _b !== void 0 ? _b : (_c = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null || _c === void 0 ? void 0 : _c.map((option) => {
2194
2193
  let value;
2195
2194
  let text;
2196
2195
  if (typeof option !== 'object') {