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 +24 -25
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/material-react-table.esm.js +24 -25
- package/dist/esm/material-react-table.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/inputs/MRT_EditCellTextField.tsx +28 -27
- package/src/inputs/MRT_FilterTextField.tsx +36 -35
@@ -1490,7 +1490,7 @@ const MRT_TableHeadCellColumnActionsButton = ({ header, table, }) => {
|
|
1490
1490
|
};
|
1491
1491
|
|
1492
1492
|
const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
1493
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
1493
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
1494
1494
|
const { options: { enableColumnFilterModes, columnFilterModeOptions, icons: { FilterListIcon, CloseIcon }, localization, manualFiltering, muiTableHeadCellFilterTextFieldProps, }, refs: { filterInputRefs }, setColumnFilterFns, } = table;
|
1495
1495
|
const { column } = header;
|
1496
1496
|
const { columnDef } = column;
|
@@ -1675,28 +1675,27 @@ const MRT_FilterTextField = ({ header, rangeFilterIndex, table, }) => {
|
|
1675
1675
|
? textFieldProps.sx(theme)
|
1676
1676
|
: textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.sx))) }),
|
1677
1677
|
(isSelectFilter || isMultiSelectFilter) && (React.createElement(MenuItem, { divider: true, disabled: true, hidden: true, value: "" },
|
1678
|
-
React.createElement(Box, { sx: { opacity: 0.5 } }, filterPlaceholder))), (_k = columnDef === null || columnDef === void 0 ? void 0 : columnDef.filterSelectOptions) === null ||
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
})),
|
1678
|
+
React.createElement(Box, { 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) => {
|
1679
|
+
var _a;
|
1680
|
+
let value;
|
1681
|
+
let text;
|
1682
|
+
if (typeof option !== 'object') {
|
1683
|
+
value = option;
|
1684
|
+
text = option;
|
1685
|
+
}
|
1686
|
+
else {
|
1687
|
+
value = option.value;
|
1688
|
+
text = option.text;
|
1689
|
+
}
|
1690
|
+
return (React.createElement(MenuItem, { key: value, sx: {
|
1691
|
+
display: 'flex',
|
1692
|
+
m: 0,
|
1693
|
+
alignItems: 'center',
|
1694
|
+
gap: '0.5rem',
|
1695
|
+
}, value: value },
|
1696
|
+
isMultiSelectFilter && (React.createElement(Checkbox, { checked: ((_a = column.getFilterValue()) !== null && _a !== void 0 ? _a : []).includes(value), sx: { mr: '0.5rem' } })),
|
1697
|
+
text));
|
1698
|
+
})),
|
1700
1699
|
React.createElement(MRT_FilterOptionMenu, { anchorEl: anchorEl, header: header, setAnchorEl: setAnchorEl, table: table, setFilterValue: setFilterValue })));
|
1701
1700
|
};
|
1702
1701
|
|
@@ -2052,7 +2051,7 @@ const MRT_TableHead = ({ table, virtualColumns, virtualPaddingLeft, virtualPaddi
|
|
2052
2051
|
};
|
2053
2052
|
|
2054
2053
|
const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
|
2055
|
-
var _a, _b;
|
2054
|
+
var _a, _b, _c;
|
2056
2055
|
const { getState, options: { muiTableBodyCellEditTextFieldProps }, refs: { editInputRefs }, setEditingCell, setEditingRow, } = table;
|
2057
2056
|
const { column, row } = cell;
|
2058
2057
|
const { columnDef } = column;
|
@@ -2113,7 +2112,7 @@ const MRT_EditCellTextField = ({ cell, showLabel, table, }) => {
|
|
2113
2112
|
var _a;
|
2114
2113
|
e.stopPropagation();
|
2115
2114
|
(_a = textFieldProps === null || textFieldProps === void 0 ? void 0 : textFieldProps.onClick) === null || _a === void 0 ? void 0 : _a.call(textFieldProps, e);
|
2116
|
-
}, onBlur: handleBlur, onChange: handleChange, onKeyDown: handleEnterKeyDown }), (_b = columnDef === null || columnDef === void 0 ? void 0 : columnDef.editSelectOptions) === null ||
|
2115
|
+
}, 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) => {
|
2117
2116
|
let value;
|
2118
2117
|
let text;
|
2119
2118
|
if (typeof option !== 'object') {
|