material-react-table 0.7.1 → 0.7.4
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/MaterialReactTable.d.ts +23 -2
- package/dist/icons.d.ts +1 -0
- package/dist/localization.d.ts +1 -0
- package/dist/material-react-table.cjs.development.js +206 -68
- package/dist/material-react-table.cjs.development.js.map +1 -1
- package/dist/material-react-table.cjs.production.min.js +1 -1
- package/dist/material-react-table.cjs.production.min.js.map +1 -1
- package/dist/material-react-table.esm.js +206 -68
- package/dist/material-react-table.esm.js.map +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +6 -6
- package/src/MaterialReactTable.tsx +42 -0
- package/src/body/MRT_TableBodyCell.tsx +39 -5
- package/src/buttons/MRT_CopyButton.tsx +1 -0
- package/src/footer/MRT_TableFooterCell.tsx +3 -0
- package/src/head/MRT_TableHeadCell.tsx +52 -53
- package/src/head/MRT_TableHeadRow.tsx +12 -3
- package/src/icons.ts +3 -0
- package/src/inputs/MRT_EditCellTextField.tsx +12 -1
- package/src/localization.ts +2 -0
- package/src/menus/MRT_ColumnActionMenu.tsx +26 -4
- package/src/table/MRT_TableContainer.tsx +3 -4
- package/src/table/MRT_TableRoot.tsx +84 -17
- package/src/utils.ts +5 -1
|
@@ -27,6 +27,7 @@ var FullscreenIcon = _interopDefault(require('@mui/icons-material/Fullscreen'));
|
|
|
27
27
|
var MoreHorizIcon = _interopDefault(require('@mui/icons-material/MoreHoriz'));
|
|
28
28
|
var MoreVertIcon = _interopDefault(require('@mui/icons-material/MoreVert'));
|
|
29
29
|
var PushPinIcon = _interopDefault(require('@mui/icons-material/PushPin'));
|
|
30
|
+
var RestartAltIcon = _interopDefault(require('@mui/icons-material/RestartAlt'));
|
|
30
31
|
var SaveIcon = _interopDefault(require('@mui/icons-material/Save'));
|
|
31
32
|
var SearchIcon = _interopDefault(require('@mui/icons-material/Search'));
|
|
32
33
|
var SearchOffIcon = _interopDefault(require('@mui/icons-material/SearchOff'));
|
|
@@ -104,6 +105,7 @@ var MRT_DefaultLocalization_EN = {
|
|
|
104
105
|
hideColumn: 'Hide {column} column',
|
|
105
106
|
pinToLeft: 'Pin to left',
|
|
106
107
|
pinToRight: 'Pin to right',
|
|
108
|
+
resetColumnSize: 'Reset column size',
|
|
107
109
|
rowActions: 'Row Actions',
|
|
108
110
|
rowNumber: '#',
|
|
109
111
|
rowNumbers: 'Row Numbers',
|
|
@@ -152,6 +154,7 @@ var MRT_Default_Icons = {
|
|
|
152
154
|
MoreHorizIcon: MoreHorizIcon,
|
|
153
155
|
MoreVertIcon: MoreVertIcon,
|
|
154
156
|
PushPinIcon: PushPinIcon,
|
|
157
|
+
RestartAltIcon: RestartAltIcon,
|
|
155
158
|
SaveIcon: SaveIcon,
|
|
156
159
|
SearchIcon: SearchIcon,
|
|
157
160
|
SearchOffIcon: SearchOffIcon,
|
|
@@ -682,9 +685,10 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
682
685
|
setColumnOrder = tableInstance.setColumnOrder,
|
|
683
686
|
_tableInstance$option = tableInstance.options,
|
|
684
687
|
enableColumnFilters = _tableInstance$option.enableColumnFilters,
|
|
685
|
-
|
|
688
|
+
enableColumnResizing = _tableInstance$option.enableColumnResizing,
|
|
686
689
|
enableGrouping = _tableInstance$option.enableGrouping,
|
|
687
690
|
enableHiding = _tableInstance$option.enableHiding,
|
|
691
|
+
enablePinning = _tableInstance$option.enablePinning,
|
|
688
692
|
enableSorting = _tableInstance$option.enableSorting,
|
|
689
693
|
_tableInstance$option2 = _tableInstance$option.icons,
|
|
690
694
|
ArrowRightIcon = _tableInstance$option2.ArrowRightIcon,
|
|
@@ -695,6 +699,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
695
699
|
FilterListOffIcon = _tableInstance$option2.FilterListOffIcon,
|
|
696
700
|
PushPinIcon = _tableInstance$option2.PushPinIcon,
|
|
697
701
|
SortIcon = _tableInstance$option2.SortIcon,
|
|
702
|
+
RestartAltIcon = _tableInstance$option2.RestartAltIcon,
|
|
698
703
|
VisibilityOffIcon = _tableInstance$option2.VisibilityOffIcon,
|
|
699
704
|
idPrefix = _tableInstance$option.idPrefix,
|
|
700
705
|
localization = _tableInstance$option.localization,
|
|
@@ -702,8 +707,9 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
702
707
|
var column = header.column;
|
|
703
708
|
|
|
704
709
|
var _getState = getState(),
|
|
705
|
-
|
|
706
|
-
columnVisibility = _getState.columnVisibility
|
|
710
|
+
columnSizing = _getState.columnSizing,
|
|
711
|
+
columnVisibility = _getState.columnVisibility,
|
|
712
|
+
isDensePadding = _getState.isDensePadding;
|
|
707
713
|
|
|
708
714
|
var _useState = React.useState(null),
|
|
709
715
|
filterMenuAnchorEl = _useState[0],
|
|
@@ -728,6 +734,11 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
728
734
|
setAnchorEl(null);
|
|
729
735
|
};
|
|
730
736
|
|
|
737
|
+
var handleResetColumnSize = function handleResetColumnSize() {
|
|
738
|
+
column.resetSize();
|
|
739
|
+
setAnchorEl(null);
|
|
740
|
+
};
|
|
741
|
+
|
|
731
742
|
var handleHideColumn = function handleHideColumn() {
|
|
732
743
|
column.toggleVisibility(false);
|
|
733
744
|
setAnchorEl(null);
|
|
@@ -847,7 +858,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
847
858
|
}, React__default.createElement(material.Box, {
|
|
848
859
|
sx: commonListItemStyles
|
|
849
860
|
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(DynamicFeedIcon, null)), (_localization = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) == null ? void 0 : _localization.replace('{column}', String(column.header))))], enablePinning && column.getCanPin() && [React__default.createElement(material.MenuItem, {
|
|
850
|
-
disabled: column.getIsPinned() === 'left',
|
|
861
|
+
disabled: column.getIsPinned() === 'left' || !column.getCanPin(),
|
|
851
862
|
key: 0,
|
|
852
863
|
onClick: function onClick() {
|
|
853
864
|
return handlePinColumn('left');
|
|
@@ -860,7 +871,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
860
871
|
transform: 'rotate(90deg)'
|
|
861
872
|
}
|
|
862
873
|
})), localization.pinToLeft)), React__default.createElement(material.MenuItem, {
|
|
863
|
-
disabled: column.getIsPinned() === 'right',
|
|
874
|
+
disabled: column.getIsPinned() === 'right' || !column.getCanPin(),
|
|
864
875
|
key: 0,
|
|
865
876
|
onClick: function onClick() {
|
|
866
877
|
return handlePinColumn('right');
|
|
@@ -882,7 +893,14 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
882
893
|
sx: commonMenuItemStyles$1
|
|
883
894
|
}, React__default.createElement(material.Box, {
|
|
884
895
|
sx: commonListItemStyles
|
|
885
|
-
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(PushPinIcon, null)), localization.unpin))],
|
|
896
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(PushPinIcon, null)), localization.unpin))], enableColumnResizing && [React__default.createElement(material.MenuItem, {
|
|
897
|
+
disabled: !column.getCanResize() || !columnSizing[column.id],
|
|
898
|
+
key: 0,
|
|
899
|
+
onClick: handleResetColumnSize,
|
|
900
|
+
sx: commonMenuItemStyles$1
|
|
901
|
+
}, React__default.createElement(material.Box, {
|
|
902
|
+
sx: commonListItemStyles
|
|
903
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(RestartAltIcon, null)), localization.resetColumnSize))], enableHiding && [React__default.createElement(material.MenuItem, {
|
|
886
904
|
disabled: column.enableHiding === false,
|
|
887
905
|
key: 0,
|
|
888
906
|
onClick: handleHideColumn,
|
|
@@ -2019,16 +2037,18 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2019
2037
|
return _extends({
|
|
2020
2038
|
backgroundColor: theme.palette.background["default"],
|
|
2021
2039
|
backgroundImage: "linear-gradient(" + material.alpha(theme.palette.common.white, 0.05) + "," + material.alpha(theme.palette.common.white, 0.05) + ")",
|
|
2022
|
-
boxShadow: "3px 0 6px " + material.alpha(theme.palette.common.black, 0.1),
|
|
2023
2040
|
fontWeight: 'bold',
|
|
2024
2041
|
height: '100%',
|
|
2025
|
-
|
|
2042
|
+
maxWidth: "min(" + column.getWidth() + "px, " + column.maxWidth + "px)",
|
|
2043
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2026
2044
|
p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
|
|
2027
2045
|
pt: column.columnDefType === 'display' ? 0 : isDensePadding ? '0.75rem' : '1.25rem',
|
|
2028
2046
|
pb: column.columnDefType === 'display' ? 0 : undefined,
|
|
2047
|
+
overflow: 'visible',
|
|
2029
2048
|
transition: "all " + (enableColumnResizing ? 0 : '0.2s') + " ease-in-out",
|
|
2030
2049
|
verticalAlign: 'text-top',
|
|
2031
|
-
width: header.getWidth()
|
|
2050
|
+
width: header.getWidth(),
|
|
2051
|
+
zIndex: column.getIsResizing() ? 2 : 1
|
|
2032
2052
|
}, tableCellProps == null ? void 0 : tableCellProps.sx);
|
|
2033
2053
|
}
|
|
2034
2054
|
}), header.isPlaceholder ? null : column.columnDefType === 'display' ? headerElement : React__default.createElement(material.Box, {
|
|
@@ -2049,7 +2069,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2049
2069
|
flexWrap: 'nowrap',
|
|
2050
2070
|
whiteSpace: column.header.length < 24 ? 'nowrap' : 'normal'
|
|
2051
2071
|
}
|
|
2052
|
-
}, headerElement, column.columnDefType
|
|
2072
|
+
}, headerElement, column.columnDefType === 'data' && column.getCanSort() && React__default.createElement(material.Tooltip, {
|
|
2053
2073
|
arrow: true,
|
|
2054
2074
|
placement: "top",
|
|
2055
2075
|
title: sortTooltip
|
|
@@ -2057,7 +2077,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2057
2077
|
"aria-label": sortTooltip,
|
|
2058
2078
|
active: !!column.getIsSorted(),
|
|
2059
2079
|
direction: column.getIsSorted() ? column.getIsSorted() : undefined
|
|
2060
|
-
})), column.columnDefType
|
|
2080
|
+
})), column.columnDefType === 'data' && enableColumnFilters && !!column.getCanColumnFilter() && React__default.createElement(material.Tooltip, {
|
|
2061
2081
|
arrow: true,
|
|
2062
2082
|
placement: "top",
|
|
2063
2083
|
title: filterTooltip
|
|
@@ -2078,16 +2098,10 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2078
2098
|
opacity: 0.8
|
|
2079
2099
|
}
|
|
2080
2100
|
}
|
|
2081
|
-
}, showFilters && !column.getColumnFilterValue() ? React__default.createElement(FilterAltOff, null) : React__default.createElement(FilterAltIcon, null)))), React__default.createElement(
|
|
2082
|
-
sx: {
|
|
2083
|
-
alignItems: 'center',
|
|
2084
|
-
display: 'flex',
|
|
2085
|
-
flexWrap: 'nowrap'
|
|
2086
|
-
}
|
|
2087
|
-
}, (enableColumnActions || column.enableColumnActions) && column.enableColumnActions !== false && column.columnDefType !== 'group' && React__default.createElement(MRT_ToggleColumnActionMenuButton, {
|
|
2101
|
+
}, showFilters && !column.getColumnFilterValue() ? React__default.createElement(FilterAltOff, null) : React__default.createElement(FilterAltIcon, null)))), (enableColumnActions || column.enableColumnActions) && column.enableColumnActions !== false && column.columnDefType !== 'group' && React__default.createElement(MRT_ToggleColumnActionMenuButton, {
|
|
2088
2102
|
header: header,
|
|
2089
2103
|
tableInstance: tableInstance
|
|
2090
|
-
}),
|
|
2104
|
+
}), column.getCanResize() && React__default.createElement(material.Divider, Object.assign({
|
|
2091
2105
|
flexItem: true,
|
|
2092
2106
|
orientation: "vertical",
|
|
2093
2107
|
onDoubleClick: function onDoubleClick() {
|
|
@@ -2095,14 +2109,19 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2095
2109
|
},
|
|
2096
2110
|
sx: function sx(theme) {
|
|
2097
2111
|
return {
|
|
2098
|
-
borderRightWidth: '2px',
|
|
2099
2112
|
borderRadius: '2px',
|
|
2100
|
-
|
|
2113
|
+
borderRightWidth: '2px',
|
|
2101
2114
|
cursor: 'col-resize',
|
|
2102
|
-
|
|
2115
|
+
height: showFilters && column.columnDefType === 'data' ? '4rem' : '2rem',
|
|
2116
|
+
opacity: 0.8,
|
|
2117
|
+
position: 'absolute',
|
|
2118
|
+
right: '1px',
|
|
2103
2119
|
touchAction: 'none',
|
|
2120
|
+
transition: 'all 0.2s ease-in-out',
|
|
2121
|
+
userSelect: 'none',
|
|
2122
|
+
zIndex: 2000,
|
|
2104
2123
|
'&:active': {
|
|
2105
|
-
backgroundColor: theme.palette.
|
|
2124
|
+
backgroundColor: theme.palette.info.main,
|
|
2106
2125
|
opacity: 1
|
|
2107
2126
|
}
|
|
2108
2127
|
};
|
|
@@ -2113,7 +2132,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2113
2132
|
transform: column.getIsResizing() ? "translateX(" + getState().columnSizingInfo.deltaOffset + "px)" : ''
|
|
2114
2133
|
}
|
|
2115
2134
|
});
|
|
2116
|
-
}))))
|
|
2135
|
+
})))), column.columnDefType === 'data' && column.getCanColumnFilter() && React__default.createElement(material.Collapse, {
|
|
2117
2136
|
"in": showFilters
|
|
2118
2137
|
}, React__default.createElement(MRT_FilterTextField, {
|
|
2119
2138
|
header: header,
|
|
@@ -2132,7 +2151,13 @@ var MRT_TableHeadRow = function MRT_TableHeadRow(_ref) {
|
|
|
2132
2151
|
|
|
2133
2152
|
var tableRowProps = _extends({}, headerGroup == null ? void 0 : headerGroup.getHeaderGroupProps(), mTableHeadRowProps);
|
|
2134
2153
|
|
|
2135
|
-
return React__default.createElement(material.TableRow, Object.assign({}, tableRowProps
|
|
2154
|
+
return React__default.createElement(material.TableRow, Object.assign({}, tableRowProps, {
|
|
2155
|
+
sx: function sx(theme) {
|
|
2156
|
+
return _extends({
|
|
2157
|
+
boxShadow: "4px 0 8px " + material.alpha(theme.palette.common.black, 0.1)
|
|
2158
|
+
}, tableRowProps == null ? void 0 : tableRowProps.sx);
|
|
2159
|
+
}
|
|
2160
|
+
}), headerGroup.headers.map(function (header, index) {
|
|
2136
2161
|
return React__default.createElement(MRT_TableHeadCell, {
|
|
2137
2162
|
header: header,
|
|
2138
2163
|
key: header.id || index,
|
|
@@ -2172,8 +2197,12 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2172
2197
|
tableInstance = _ref.tableInstance;
|
|
2173
2198
|
var getState = tableInstance.getState,
|
|
2174
2199
|
_tableInstance$option = tableInstance.options,
|
|
2200
|
+
idPrefix = _tableInstance$option.idPrefix,
|
|
2175
2201
|
enableEditing = _tableInstance$option.enableEditing,
|
|
2176
2202
|
muiTableBodyCellEditTextFieldProps = _tableInstance$option.muiTableBodyCellEditTextFieldProps,
|
|
2203
|
+
onCellEditBlur = _tableInstance$option.onCellEditBlur,
|
|
2204
|
+
onCellEditChange = _tableInstance$option.onCellEditChange,
|
|
2205
|
+
setCurrentEditingCell = tableInstance.setCurrentEditingCell,
|
|
2177
2206
|
setCurrentEditingRow = tableInstance.setCurrentEditingRow;
|
|
2178
2207
|
|
|
2179
2208
|
var _useState = React.useState(cell.value),
|
|
@@ -2190,6 +2219,11 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2190
2219
|
cell: cell,
|
|
2191
2220
|
tableInstance: tableInstance
|
|
2192
2221
|
});
|
|
2222
|
+
onCellEditChange == null ? void 0 : onCellEditChange({
|
|
2223
|
+
event: event,
|
|
2224
|
+
cell: cell,
|
|
2225
|
+
tableInstance: tableInstance
|
|
2226
|
+
});
|
|
2193
2227
|
};
|
|
2194
2228
|
|
|
2195
2229
|
var handleBlur = function handleBlur(event) {
|
|
@@ -2198,11 +2232,17 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2198
2232
|
setCurrentEditingRow(_extends({}, getState().currentEditingRow));
|
|
2199
2233
|
}
|
|
2200
2234
|
|
|
2235
|
+
setCurrentEditingCell(null);
|
|
2201
2236
|
column.onCellEditBlur == null ? void 0 : column.onCellEditBlur({
|
|
2202
2237
|
event: event,
|
|
2203
2238
|
cell: cell,
|
|
2204
2239
|
tableInstance: tableInstance
|
|
2205
2240
|
});
|
|
2241
|
+
onCellEditBlur == null ? void 0 : onCellEditBlur({
|
|
2242
|
+
event: event,
|
|
2243
|
+
cell: cell,
|
|
2244
|
+
tableInstance: tableInstance
|
|
2245
|
+
});
|
|
2206
2246
|
};
|
|
2207
2247
|
|
|
2208
2248
|
var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps({
|
|
@@ -2224,6 +2264,7 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2224
2264
|
}
|
|
2225
2265
|
|
|
2226
2266
|
return React__default.createElement(material.TextField, Object.assign({
|
|
2267
|
+
id: "mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id,
|
|
2227
2268
|
margin: "dense",
|
|
2228
2269
|
onBlur: handleBlur,
|
|
2229
2270
|
onChange: handleChange,
|
|
@@ -2284,6 +2325,7 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
|
|
|
2284
2325
|
backgroundColor: 'transparent',
|
|
2285
2326
|
border: 'none',
|
|
2286
2327
|
color: 'inherit',
|
|
2328
|
+
cursor: 'copy',
|
|
2287
2329
|
fontFamily: 'inherit',
|
|
2288
2330
|
fontSize: 'inherit',
|
|
2289
2331
|
letterSpacing: 'inherit',
|
|
@@ -2304,15 +2346,19 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2304
2346
|
var getIsSomeColumnsPinned = tableInstance.getIsSomeColumnsPinned,
|
|
2305
2347
|
getState = tableInstance.getState,
|
|
2306
2348
|
_tableInstance$option = tableInstance.options,
|
|
2349
|
+
editingMode = _tableInstance$option.editingMode,
|
|
2307
2350
|
enableClickToCopy = _tableInstance$option.enableClickToCopy,
|
|
2308
|
-
enablePinning = _tableInstance$option.enablePinning,
|
|
2309
2351
|
enableEditing = _tableInstance$option.enableEditing,
|
|
2352
|
+
enablePinning = _tableInstance$option.enablePinning,
|
|
2353
|
+
idPrefix = _tableInstance$option.idPrefix,
|
|
2310
2354
|
isLoading = _tableInstance$option.isLoading,
|
|
2311
2355
|
muiTableBodyCellProps = _tableInstance$option.muiTableBodyCellProps,
|
|
2312
2356
|
muiTableBodyCellSkeletonProps = _tableInstance$option.muiTableBodyCellSkeletonProps,
|
|
2313
|
-
onCellClick = _tableInstance$option.onCellClick
|
|
2357
|
+
onCellClick = _tableInstance$option.onCellClick,
|
|
2358
|
+
setCurrentEditingCell = tableInstance.setCurrentEditingCell;
|
|
2314
2359
|
|
|
2315
2360
|
var _getState = getState(),
|
|
2361
|
+
currentEditingCell = _getState.currentEditingCell,
|
|
2316
2362
|
currentEditingRow = _getState.currentEditingRow,
|
|
2317
2363
|
isDensePadding = _getState.isDensePadding;
|
|
2318
2364
|
|
|
@@ -2332,6 +2378,23 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2332
2378
|
var skeletonWidth = React.useMemo(function () {
|
|
2333
2379
|
return column.columnDefType === 'display' ? column.getWidth() / 2 : Math.random() * (column.getWidth() - column.getWidth() / 3) + column.getWidth() / 3;
|
|
2334
2380
|
}, [column.columnDefType, column.getWidth()]);
|
|
2381
|
+
var isEditable = (enableEditing || column.enableEditing) && column.enableEditing !== false;
|
|
2382
|
+
var isEditing = isEditable && (editingMode === 'table' || (currentEditingRow == null ? void 0 : currentEditingRow.id) === row.id || (currentEditingCell == null ? void 0 : currentEditingCell.id) === cell.id);
|
|
2383
|
+
|
|
2384
|
+
var handleDoubleClick = function handleDoubleClick(_event) {
|
|
2385
|
+
if ((enableEditing || column.enableEditing) && column.enableEditing !== false && editingMode === 'cell') {
|
|
2386
|
+
setCurrentEditingCell(cell);
|
|
2387
|
+
setTimeout(function () {
|
|
2388
|
+
var textField = document.getElementById("mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id);
|
|
2389
|
+
|
|
2390
|
+
if (textField) {
|
|
2391
|
+
textField.focus();
|
|
2392
|
+
textField.select();
|
|
2393
|
+
}
|
|
2394
|
+
}, 200);
|
|
2395
|
+
}
|
|
2396
|
+
};
|
|
2397
|
+
|
|
2335
2398
|
return React__default.createElement(material.TableCell, Object.assign({
|
|
2336
2399
|
onClick: function onClick(event) {
|
|
2337
2400
|
return onCellClick == null ? void 0 : onCellClick({
|
|
@@ -2339,13 +2402,18 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2339
2402
|
cell: cell,
|
|
2340
2403
|
tableInstance: tableInstance
|
|
2341
2404
|
});
|
|
2342
|
-
}
|
|
2405
|
+
},
|
|
2406
|
+
onDoubleClick: handleDoubleClick
|
|
2343
2407
|
}, tableCellProps, {
|
|
2344
2408
|
sx: _extends({
|
|
2409
|
+
cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text',
|
|
2410
|
+
maxWidth: "min(" + column.getWidth() + "px, fit-content)",
|
|
2411
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2345
2412
|
p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
|
|
2346
2413
|
pl: column.id === 'mrt-expand' ? row.depth + (isDensePadding ? 0.5 : 0.75) + "rem" : undefined,
|
|
2347
2414
|
transition: 'all 0.2s ease-in-out',
|
|
2348
|
-
whiteSpace: isDensePadding || enablePinning && getIsSomeColumnsPinned() ? 'nowrap' : 'normal'
|
|
2415
|
+
whiteSpace: isDensePadding || enablePinning && getIsSomeColumnsPinned() ? 'nowrap' : 'normal',
|
|
2416
|
+
width: column.getWidth()
|
|
2349
2417
|
}, tableCellProps == null ? void 0 : tableCellProps.sx)
|
|
2350
2418
|
}), isLoading ? React__default.createElement(material.Skeleton, Object.assign({
|
|
2351
2419
|
animation: "wave",
|
|
@@ -2354,7 +2422,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2354
2422
|
}, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.Cell == null ? void 0 : column.Cell({
|
|
2355
2423
|
cell: cell,
|
|
2356
2424
|
tableInstance: tableInstance
|
|
2357
|
-
}) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() :
|
|
2425
|
+
}) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : isEditing ? React__default.createElement(MRT_EditCellTextField, {
|
|
2358
2426
|
cell: cell,
|
|
2359
2427
|
tableInstance: tableInstance
|
|
2360
2428
|
}) : (enableClickToCopy || column.enableClickToCopy) && column.enableClickToCopy !== false ? React__default.createElement(React__default.Fragment, null, React__default.createElement(MRT_CopyButton, {
|
|
@@ -2521,8 +2589,11 @@ var MRT_TableFooterCell = function MRT_TableFooterCell(_ref) {
|
|
|
2521
2589
|
backgroundColor: theme.palette.background["default"],
|
|
2522
2590
|
backgroundImage: "linear-gradient(" + material.alpha(theme.palette.common.white, 0.05) + "," + material.alpha(theme.palette.common.white, 0.05) + ")",
|
|
2523
2591
|
fontWeight: 'bold',
|
|
2592
|
+
maxWidth: "min(" + column.getWidth() + "px, " + column.maxWidth + "px)",
|
|
2593
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2524
2594
|
p: isDensePadding ? '0.5rem' : '1rem',
|
|
2525
2595
|
transition: "all " + (enableColumnResizing ? '10ms' : '0.2s') + " ease-in-out",
|
|
2596
|
+
width: column.getWidth(),
|
|
2526
2597
|
verticalAlign: 'text-top'
|
|
2527
2598
|
}, tableCellProps == null ? void 0 : tableCellProps.sx);
|
|
2528
2599
|
}
|
|
@@ -2620,7 +2691,7 @@ var commonBoxStyles = function commonBoxStyles(_ref) {
|
|
|
2620
2691
|
return {
|
|
2621
2692
|
display: 'grid',
|
|
2622
2693
|
minWidth: visible ? '200px' : 0,
|
|
2623
|
-
overflowX: 'auto',
|
|
2694
|
+
overflowX: pinned ? 'scroll' : 'auto',
|
|
2624
2695
|
boxShadow: pinned === 'left' ? "0 1px 12px " + material.alpha(theme.palette.common.black, 0.5) : pinned === 'right' ? "0 -1px 12px " + material.alpha(theme.palette.common.black, 0.5) : 'none'
|
|
2625
2696
|
};
|
|
2626
2697
|
};
|
|
@@ -2799,7 +2870,7 @@ var createGroup = function createGroup(table, column, currentFilterTypes) {
|
|
|
2799
2870
|
var createDataColumn = function createDataColumn(table, column, currentFilterTypes) {
|
|
2800
2871
|
return (// @ts-ignore
|
|
2801
2872
|
table.createDataColumn(column.id, _extends({
|
|
2802
|
-
|
|
2873
|
+
filterFn: currentFilterTypes[column.id] instanceof Function ? currentFilterTypes[column.id] : defaultFilterFNs[currentFilterTypes[column.id]]
|
|
2803
2874
|
}, column))
|
|
2804
2875
|
);
|
|
2805
2876
|
};
|
|
@@ -2808,7 +2879,7 @@ var createDisplayColumn = function createDisplayColumn(table, column) {
|
|
|
2808
2879
|
};
|
|
2809
2880
|
|
|
2810
2881
|
var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
2811
|
-
var
|
|
2882
|
+
var _initialState$current, _initialState$current2, _initialState$isDense, _initialState$isFullS, _initialState$showFil, _initialState$showGlo, _initialState$paginat, _initialState$paginat2, _initialState$paginat3, _initialState$paginat4, _initialState$paginat5, _initialState$paginat6, _props$globalFilterTy;
|
|
2812
2883
|
|
|
2813
2884
|
var _useState = React.useState(props.idPrefix),
|
|
2814
2885
|
idPrefix = _useState[0],
|
|
@@ -2819,50 +2890,77 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2819
2890
|
|
|
2820
2891
|
return setIdPrefix((_props$idPrefix = props.idPrefix) != null ? _props$idPrefix : Math.random().toString(36).substring(2, 9));
|
|
2821
2892
|
}, [props.idPrefix]);
|
|
2893
|
+
var initialState = React.useMemo(function () {
|
|
2894
|
+
if (!props.enablePersistentState || !props.idPrefix) {
|
|
2895
|
+
return props.initialState;
|
|
2896
|
+
}
|
|
2822
2897
|
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2898
|
+
if (typeof window === 'undefined') {
|
|
2899
|
+
{
|
|
2900
|
+
console.error('The MRT Persistent Table State feature is not supported if using SSR, but you can wrap your <MaterialReactTable /> in a MUI <NoSsr> tags to let it work');
|
|
2901
|
+
}
|
|
2902
|
+
|
|
2903
|
+
return props.initialState;
|
|
2904
|
+
}
|
|
2905
|
+
|
|
2906
|
+
var storedState = props.persistentStateMode === 'localStorage' ? localStorage.getItem("mrt-" + idPrefix + "-table-state") : props.persistentStateMode === 'sessionStorage' ? sessionStorage.getItem("mrt-" + idPrefix + "-table-state") : '{}';
|
|
2907
|
+
|
|
2908
|
+
if (storedState) {
|
|
2909
|
+
var parsedState = JSON.parse(storedState);
|
|
2826
2910
|
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2911
|
+
if (parsedState) {
|
|
2912
|
+
return _extends({}, props.initialState, parsedState);
|
|
2913
|
+
}
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
return props.initialState;
|
|
2917
|
+
}, []);
|
|
2830
2918
|
|
|
2831
|
-
var
|
|
2832
|
-
|
|
2833
|
-
|
|
2919
|
+
var _useState2 = React.useState((_initialState$current = initialState == null ? void 0 : initialState.currentEditingCell) != null ? _initialState$current : null),
|
|
2920
|
+
currentEditingCell = _useState2[0],
|
|
2921
|
+
setCurrentEditingCell = _useState2[1];
|
|
2834
2922
|
|
|
2835
|
-
var
|
|
2836
|
-
|
|
2837
|
-
|
|
2923
|
+
var _useState3 = React.useState((_initialState$current2 = initialState == null ? void 0 : initialState.currentEditingRow) != null ? _initialState$current2 : null),
|
|
2924
|
+
currentEditingRow = _useState3[0],
|
|
2925
|
+
setCurrentEditingRow = _useState3[1];
|
|
2838
2926
|
|
|
2839
|
-
var
|
|
2840
|
-
|
|
2841
|
-
|
|
2927
|
+
var _useState4 = React.useState((_initialState$isDense = initialState == null ? void 0 : initialState.isDensePadding) != null ? _initialState$isDense : false),
|
|
2928
|
+
isDensePadding = _useState4[0],
|
|
2929
|
+
setIsDensePadding = _useState4[1];
|
|
2842
2930
|
|
|
2843
|
-
var
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2931
|
+
var _useState5 = React.useState((_initialState$isFullS = initialState == null ? void 0 : initialState.isFullScreen) != null ? _initialState$isFullS : false),
|
|
2932
|
+
isFullScreen = _useState5[0],
|
|
2933
|
+
setIsFullScreen = _useState5[1];
|
|
2934
|
+
|
|
2935
|
+
var _useState6 = React.useState((_initialState$showFil = initialState == null ? void 0 : initialState.showFilters) != null ? _initialState$showFil : false),
|
|
2936
|
+
showFilters = _useState6[0],
|
|
2937
|
+
setShowFilters = _useState6[1];
|
|
2938
|
+
|
|
2939
|
+
var _useState7 = React.useState((_initialState$showGlo = initialState == null ? void 0 : initialState.showGlobalFilter) != null ? _initialState$showGlo : false),
|
|
2940
|
+
showGlobalFilter = _useState7[0],
|
|
2941
|
+
setShowGlobalFilter = _useState7[1];
|
|
2942
|
+
|
|
2943
|
+
var _useState8 = React.useState({
|
|
2944
|
+
pageIndex: (_initialState$paginat = initialState == null ? void 0 : (_initialState$paginat2 = initialState.pagination) == null ? void 0 : _initialState$paginat2.pageIndex) != null ? _initialState$paginat : 0,
|
|
2945
|
+
pageSize: (_initialState$paginat3 = initialState == null ? void 0 : (_initialState$paginat4 = initialState.pagination) == null ? void 0 : _initialState$paginat4.pageSize) != null ? _initialState$paginat3 : 10,
|
|
2946
|
+
pageCount: (_initialState$paginat5 = initialState == null ? void 0 : (_initialState$paginat6 = initialState.pagination) == null ? void 0 : _initialState$paginat6.pageCount) != null ? _initialState$paginat5 : -1
|
|
2847
2947
|
}),
|
|
2848
|
-
pagination =
|
|
2849
|
-
setPagination =
|
|
2948
|
+
pagination = _useState8[0],
|
|
2949
|
+
setPagination = _useState8[1];
|
|
2850
2950
|
|
|
2851
|
-
var
|
|
2951
|
+
var _useState9 = React.useState(function () {
|
|
2852
2952
|
return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
|
|
2853
|
-
var _ref, _c$filter,
|
|
2953
|
+
var _ref, _c$filter, _initialState$current3, _c$filterSelectOption, _ref2;
|
|
2854
2954
|
|
|
2855
|
-
return _ref2 = {}, _ref2[c.id] = (_ref = (_c$filter = c.filter) != null ? _c$filter :
|
|
2856
|
-
return cf.id === c.id;
|
|
2857
|
-
})) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_TYPE.EQUALS : MRT_FILTER_TYPE.BEST_MATCH, _ref2;
|
|
2955
|
+
return _ref2 = {}, _ref2[c.id] = (_ref = (_c$filter = c.filter) != null ? _c$filter : initialState == null ? void 0 : (_initialState$current3 = initialState.currentFilterTypes) == null ? void 0 : _initialState$current3[c.id]) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_TYPE.EQUALS : MRT_FILTER_TYPE.BEST_MATCH, _ref2;
|
|
2858
2956
|
})));
|
|
2859
2957
|
}),
|
|
2860
|
-
currentFilterTypes =
|
|
2861
|
-
setCurrentFilterTypes =
|
|
2958
|
+
currentFilterTypes = _useState9[0],
|
|
2959
|
+
setCurrentFilterTypes = _useState9[1];
|
|
2862
2960
|
|
|
2863
|
-
var
|
|
2864
|
-
currentGlobalFilterType =
|
|
2865
|
-
setCurrentGlobalFilterType =
|
|
2961
|
+
var _useState10 = React.useState((_props$globalFilterTy = props.globalFilterType) != null ? _props$globalFilterTy : MRT_FILTER_TYPE.BEST_MATCH_FIRST),
|
|
2962
|
+
currentGlobalFilterType = _useState10[0],
|
|
2963
|
+
setCurrentGlobalFilterType = _useState10[1];
|
|
2866
2964
|
|
|
2867
2965
|
var table = React.useMemo(function () {
|
|
2868
2966
|
return reactTable.createTable();
|
|
@@ -2870,7 +2968,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2870
2968
|
var displayColumns = React.useMemo(function () {
|
|
2871
2969
|
var _props$localization, _props$localization2, _props$localization3, _props$localization5;
|
|
2872
2970
|
|
|
2873
|
-
return [(props.enableRowActions || props.enableEditing) && createDisplayColumn(table, {
|
|
2971
|
+
return [(props.enableRowActions || props.enableEditing && props.editingMode === 'row') && createDisplayColumn(table, {
|
|
2874
2972
|
Cell: function Cell(_ref3) {
|
|
2875
2973
|
var cell = _ref3.cell;
|
|
2876
2974
|
return React__default.createElement(MRT_ToggleRowActionMenuButton, {
|
|
@@ -2933,7 +3031,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2933
3031
|
width: 40,
|
|
2934
3032
|
minWidth: 40
|
|
2935
3033
|
})].filter(Boolean);
|
|
2936
|
-
}, [props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
|
|
3034
|
+
}, [props.editingMode, props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
|
|
2937
3035
|
var columns = React.useMemo(function () {
|
|
2938
3036
|
return table.createColumns([].concat(displayColumns, props.columns.map(function (column) {
|
|
2939
3037
|
return column.columns ? createGroup(table, column, currentFilterTypes) : createDataColumn(table, column, currentFilterTypes);
|
|
@@ -2963,7 +3061,6 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2963
3061
|
return originalRow.subRows;
|
|
2964
3062
|
},
|
|
2965
3063
|
globalFilterType: currentGlobalFilterType,
|
|
2966
|
-
idPrefix: idPrefix,
|
|
2967
3064
|
onPaginationChange: function onPaginationChange(updater) {
|
|
2968
3065
|
return setPagination(function (old) {
|
|
2969
3066
|
return reactTable.functionalUpdate(updater, old);
|
|
@@ -2972,7 +3069,11 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2972
3069
|
}, props, {
|
|
2973
3070
|
columns: columns,
|
|
2974
3071
|
data: data,
|
|
3072
|
+
idPrefix: idPrefix,
|
|
3073
|
+
//@ts-ignore
|
|
3074
|
+
initialState: initialState,
|
|
2975
3075
|
state: _extends({
|
|
3076
|
+
currentEditingCell: currentEditingCell,
|
|
2976
3077
|
currentEditingRow: currentEditingRow,
|
|
2977
3078
|
currentFilterTypes: currentFilterTypes,
|
|
2978
3079
|
currentGlobalFilterType: currentGlobalFilterType,
|
|
@@ -2984,6 +3085,9 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2984
3085
|
showGlobalFilter: showGlobalFilter
|
|
2985
3086
|
}, props.state)
|
|
2986
3087
|
})), {
|
|
3088
|
+
//@ts-ignore
|
|
3089
|
+
setCurrentEditingCell: setCurrentEditingCell,
|
|
3090
|
+
//@ts-ignore
|
|
2987
3091
|
setCurrentEditingRow: setCurrentEditingRow,
|
|
2988
3092
|
setCurrentFilterTypes: setCurrentFilterTypes,
|
|
2989
3093
|
setCurrentGlobalFilterType: setCurrentGlobalFilterType,
|
|
@@ -2993,6 +3097,28 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2993
3097
|
setShowGlobalFilter: setShowGlobalFilter
|
|
2994
3098
|
});
|
|
2995
3099
|
|
|
3100
|
+
React.useEffect(function () {
|
|
3101
|
+
if (typeof window === 'undefined' || !props.enablePersistentState) {
|
|
3102
|
+
return;
|
|
3103
|
+
}
|
|
3104
|
+
|
|
3105
|
+
if (!props.idPrefix && "development" !== 'production') {
|
|
3106
|
+
console.warn('a unique idPrefix prop is required for persistent table state to work');
|
|
3107
|
+
return;
|
|
3108
|
+
}
|
|
3109
|
+
|
|
3110
|
+
var itemArgs = ["mrt-" + idPrefix + "-table-state", JSON.stringify(tableInstance.getState())];
|
|
3111
|
+
|
|
3112
|
+
if (props.persistentStateMode === 'localStorage') {
|
|
3113
|
+
var _localStorage;
|
|
3114
|
+
|
|
3115
|
+
(_localStorage = localStorage).setItem.apply(_localStorage, itemArgs);
|
|
3116
|
+
} else if (props.persistentStateMode === 'sessionStorage') {
|
|
3117
|
+
var _sessionStorage;
|
|
3118
|
+
|
|
3119
|
+
(_sessionStorage = sessionStorage).setItem.apply(_sessionStorage, itemArgs);
|
|
3120
|
+
}
|
|
3121
|
+
}, [props.enablePersistentState, props.idPrefix, props.persistentStateMode, tableInstance]);
|
|
2996
3122
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Dialog, {
|
|
2997
3123
|
TransitionComponent: material.Grow,
|
|
2998
3124
|
PaperComponent: material.Box,
|
|
@@ -3011,14 +3137,20 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
3011
3137
|
}));
|
|
3012
3138
|
};
|
|
3013
3139
|
|
|
3014
|
-
var _excluded$5 = ["autoResetExpanded", "enableColumnActions", "enableColumnFilters", "enableDensePaddingToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableHiding", "enableMultiRowSelection", "enablePagination", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarBottom", "enableToolbarInternalActions", "enableToolbarTop", "icons", "localization", "positionActionsColumn", "positionPagination", "positionToolbarActions", "positionToolbarAlertBanner"];
|
|
3140
|
+
var _excluded$5 = ["autoResetExpanded", "columnResizeMode", "editingMode", "enableColumnActions", "enableColumnFilters", "enableColumnResizing", "enableDensePaddingToggle", "enableExpandAll", "enableFilters", "enableFullScreenToggle", "enableGlobalFilter", "enableHiding", "enableMultiRowSelection", "enablePagination", "enableSelectAll", "enableSorting", "enableStickyHeader", "enableTableFooter", "enableTableHead", "enableToolbarBottom", "enableToolbarInternalActions", "enableToolbarTop", "icons", "localization", "persistentStateMode", "positionActionsColumn", "positionPagination", "positionToolbarActions", "positionToolbarAlertBanner"];
|
|
3015
3141
|
var MaterialReactTable = (function (_ref) {
|
|
3016
3142
|
var _ref$autoResetExpande = _ref.autoResetExpanded,
|
|
3017
3143
|
autoResetExpanded = _ref$autoResetExpande === void 0 ? false : _ref$autoResetExpande,
|
|
3144
|
+
_ref$columnResizeMode = _ref.columnResizeMode,
|
|
3145
|
+
columnResizeMode = _ref$columnResizeMode === void 0 ? 'onEnd' : _ref$columnResizeMode,
|
|
3146
|
+
_ref$editingMode = _ref.editingMode,
|
|
3147
|
+
editingMode = _ref$editingMode === void 0 ? 'row' : _ref$editingMode,
|
|
3018
3148
|
_ref$enableColumnActi = _ref.enableColumnActions,
|
|
3019
3149
|
enableColumnActions = _ref$enableColumnActi === void 0 ? true : _ref$enableColumnActi,
|
|
3020
3150
|
_ref$enableColumnFilt = _ref.enableColumnFilters,
|
|
3021
3151
|
enableColumnFilters = _ref$enableColumnFilt === void 0 ? true : _ref$enableColumnFilt,
|
|
3152
|
+
_ref$enableColumnResi = _ref.enableColumnResizing,
|
|
3153
|
+
enableColumnResizing = _ref$enableColumnResi === void 0 ? false : _ref$enableColumnResi,
|
|
3022
3154
|
_ref$enableDensePaddi = _ref.enableDensePaddingToggle,
|
|
3023
3155
|
enableDensePaddingToggle = _ref$enableDensePaddi === void 0 ? true : _ref$enableDensePaddi,
|
|
3024
3156
|
_ref$enableExpandAll = _ref.enableExpandAll,
|
|
@@ -3053,6 +3185,8 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3053
3185
|
enableToolbarTop = _ref$enableToolbarTop === void 0 ? true : _ref$enableToolbarTop,
|
|
3054
3186
|
icons = _ref.icons,
|
|
3055
3187
|
localization = _ref.localization,
|
|
3188
|
+
_ref$persistentStateM = _ref.persistentStateMode,
|
|
3189
|
+
persistentStateMode = _ref$persistentStateM === void 0 ? 'sessionStorage' : _ref$persistentStateM,
|
|
3056
3190
|
_ref$positionActionsC = _ref.positionActionsColumn,
|
|
3057
3191
|
positionActionsColumn = _ref$positionActionsC === void 0 ? 'first' : _ref$positionActionsC,
|
|
3058
3192
|
_ref$positionPaginati = _ref.positionPagination,
|
|
@@ -3065,7 +3199,10 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3065
3199
|
|
|
3066
3200
|
return React__default.createElement(MRT_TableRoot, Object.assign({
|
|
3067
3201
|
autoResetExpanded: autoResetExpanded,
|
|
3202
|
+
columnResizeMode: columnResizeMode,
|
|
3203
|
+
editingMode: editingMode,
|
|
3068
3204
|
enableColumnActions: enableColumnActions,
|
|
3205
|
+
enableColumnResizing: enableColumnResizing,
|
|
3069
3206
|
enableColumnFilters: enableColumnFilters,
|
|
3070
3207
|
enableDensePaddingToggle: enableDensePaddingToggle,
|
|
3071
3208
|
enableExpandAll: enableExpandAll,
|
|
@@ -3085,6 +3222,7 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3085
3222
|
enableToolbarTop: enableToolbarTop,
|
|
3086
3223
|
icons: _extends({}, MRT_Default_Icons, icons),
|
|
3087
3224
|
localization: _extends({}, MRT_DefaultLocalization_EN, localization),
|
|
3225
|
+
persistentStateMode: persistentStateMode,
|
|
3088
3226
|
positionActionsColumn: positionActionsColumn,
|
|
3089
3227
|
positionPagination: positionPagination,
|
|
3090
3228
|
positionToolbarActions: positionToolbarActions,
|