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
|
@@ -20,6 +20,7 @@ import FullscreenIcon from '@mui/icons-material/Fullscreen';
|
|
|
20
20
|
import MoreHorizIcon from '@mui/icons-material/MoreHoriz';
|
|
21
21
|
import MoreVertIcon from '@mui/icons-material/MoreVert';
|
|
22
22
|
import PushPinIcon from '@mui/icons-material/PushPin';
|
|
23
|
+
import RestartAltIcon from '@mui/icons-material/RestartAlt';
|
|
23
24
|
import SaveIcon from '@mui/icons-material/Save';
|
|
24
25
|
import SearchIcon from '@mui/icons-material/Search';
|
|
25
26
|
import SearchOffIcon from '@mui/icons-material/SearchOff';
|
|
@@ -97,6 +98,7 @@ var MRT_DefaultLocalization_EN = {
|
|
|
97
98
|
hideColumn: 'Hide {column} column',
|
|
98
99
|
pinToLeft: 'Pin to left',
|
|
99
100
|
pinToRight: 'Pin to right',
|
|
101
|
+
resetColumnSize: 'Reset column size',
|
|
100
102
|
rowActions: 'Row Actions',
|
|
101
103
|
rowNumber: '#',
|
|
102
104
|
rowNumbers: 'Row Numbers',
|
|
@@ -145,6 +147,7 @@ var MRT_Default_Icons = {
|
|
|
145
147
|
MoreHorizIcon: MoreHorizIcon,
|
|
146
148
|
MoreVertIcon: MoreVertIcon,
|
|
147
149
|
PushPinIcon: PushPinIcon,
|
|
150
|
+
RestartAltIcon: RestartAltIcon,
|
|
148
151
|
SaveIcon: SaveIcon,
|
|
149
152
|
SearchIcon: SearchIcon,
|
|
150
153
|
SearchOffIcon: SearchOffIcon,
|
|
@@ -675,9 +678,10 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
675
678
|
setColumnOrder = tableInstance.setColumnOrder,
|
|
676
679
|
_tableInstance$option = tableInstance.options,
|
|
677
680
|
enableColumnFilters = _tableInstance$option.enableColumnFilters,
|
|
678
|
-
|
|
681
|
+
enableColumnResizing = _tableInstance$option.enableColumnResizing,
|
|
679
682
|
enableGrouping = _tableInstance$option.enableGrouping,
|
|
680
683
|
enableHiding = _tableInstance$option.enableHiding,
|
|
684
|
+
enablePinning = _tableInstance$option.enablePinning,
|
|
681
685
|
enableSorting = _tableInstance$option.enableSorting,
|
|
682
686
|
_tableInstance$option2 = _tableInstance$option.icons,
|
|
683
687
|
ArrowRightIcon = _tableInstance$option2.ArrowRightIcon,
|
|
@@ -688,6 +692,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
688
692
|
FilterListOffIcon = _tableInstance$option2.FilterListOffIcon,
|
|
689
693
|
PushPinIcon = _tableInstance$option2.PushPinIcon,
|
|
690
694
|
SortIcon = _tableInstance$option2.SortIcon,
|
|
695
|
+
RestartAltIcon = _tableInstance$option2.RestartAltIcon,
|
|
691
696
|
VisibilityOffIcon = _tableInstance$option2.VisibilityOffIcon,
|
|
692
697
|
idPrefix = _tableInstance$option.idPrefix,
|
|
693
698
|
localization = _tableInstance$option.localization,
|
|
@@ -695,8 +700,9 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
695
700
|
var column = header.column;
|
|
696
701
|
|
|
697
702
|
var _getState = getState(),
|
|
698
|
-
|
|
699
|
-
columnVisibility = _getState.columnVisibility
|
|
703
|
+
columnSizing = _getState.columnSizing,
|
|
704
|
+
columnVisibility = _getState.columnVisibility,
|
|
705
|
+
isDensePadding = _getState.isDensePadding;
|
|
700
706
|
|
|
701
707
|
var _useState = useState(null),
|
|
702
708
|
filterMenuAnchorEl = _useState[0],
|
|
@@ -721,6 +727,11 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
721
727
|
setAnchorEl(null);
|
|
722
728
|
};
|
|
723
729
|
|
|
730
|
+
var handleResetColumnSize = function handleResetColumnSize() {
|
|
731
|
+
column.resetSize();
|
|
732
|
+
setAnchorEl(null);
|
|
733
|
+
};
|
|
734
|
+
|
|
724
735
|
var handleHideColumn = function handleHideColumn() {
|
|
725
736
|
column.toggleVisibility(false);
|
|
726
737
|
setAnchorEl(null);
|
|
@@ -840,7 +851,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
840
851
|
}, React.createElement(Box, {
|
|
841
852
|
sx: commonListItemStyles
|
|
842
853
|
}, React.createElement(ListItemIcon, null, React.createElement(DynamicFeedIcon, null)), (_localization = localization[column.getIsGrouped() ? 'ungroupByColumn' : 'groupByColumn']) == null ? void 0 : _localization.replace('{column}', String(column.header))))], enablePinning && column.getCanPin() && [React.createElement(MenuItem, {
|
|
843
|
-
disabled: column.getIsPinned() === 'left',
|
|
854
|
+
disabled: column.getIsPinned() === 'left' || !column.getCanPin(),
|
|
844
855
|
key: 0,
|
|
845
856
|
onClick: function onClick() {
|
|
846
857
|
return handlePinColumn('left');
|
|
@@ -853,7 +864,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
853
864
|
transform: 'rotate(90deg)'
|
|
854
865
|
}
|
|
855
866
|
})), localization.pinToLeft)), React.createElement(MenuItem, {
|
|
856
|
-
disabled: column.getIsPinned() === 'right',
|
|
867
|
+
disabled: column.getIsPinned() === 'right' || !column.getCanPin(),
|
|
857
868
|
key: 0,
|
|
858
869
|
onClick: function onClick() {
|
|
859
870
|
return handlePinColumn('right');
|
|
@@ -875,7 +886,14 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
875
886
|
sx: commonMenuItemStyles$1
|
|
876
887
|
}, React.createElement(Box, {
|
|
877
888
|
sx: commonListItemStyles
|
|
878
|
-
}, React.createElement(ListItemIcon, null, React.createElement(PushPinIcon, null)), localization.unpin))],
|
|
889
|
+
}, React.createElement(ListItemIcon, null, React.createElement(PushPinIcon, null)), localization.unpin))], enableColumnResizing && [React.createElement(MenuItem, {
|
|
890
|
+
disabled: !column.getCanResize() || !columnSizing[column.id],
|
|
891
|
+
key: 0,
|
|
892
|
+
onClick: handleResetColumnSize,
|
|
893
|
+
sx: commonMenuItemStyles$1
|
|
894
|
+
}, React.createElement(Box, {
|
|
895
|
+
sx: commonListItemStyles
|
|
896
|
+
}, React.createElement(ListItemIcon, null, React.createElement(RestartAltIcon, null)), localization.resetColumnSize))], enableHiding && [React.createElement(MenuItem, {
|
|
879
897
|
disabled: column.enableHiding === false,
|
|
880
898
|
key: 0,
|
|
881
899
|
onClick: handleHideColumn,
|
|
@@ -2012,16 +2030,18 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2012
2030
|
return _extends({
|
|
2013
2031
|
backgroundColor: theme.palette.background["default"],
|
|
2014
2032
|
backgroundImage: "linear-gradient(" + alpha(theme.palette.common.white, 0.05) + "," + alpha(theme.palette.common.white, 0.05) + ")",
|
|
2015
|
-
boxShadow: "3px 0 6px " + alpha(theme.palette.common.black, 0.1),
|
|
2016
2033
|
fontWeight: 'bold',
|
|
2017
2034
|
height: '100%',
|
|
2018
|
-
|
|
2035
|
+
maxWidth: "min(" + column.getWidth() + "px, " + column.maxWidth + "px)",
|
|
2036
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2019
2037
|
p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
|
|
2020
2038
|
pt: column.columnDefType === 'display' ? 0 : isDensePadding ? '0.75rem' : '1.25rem',
|
|
2021
2039
|
pb: column.columnDefType === 'display' ? 0 : undefined,
|
|
2040
|
+
overflow: 'visible',
|
|
2022
2041
|
transition: "all " + (enableColumnResizing ? 0 : '0.2s') + " ease-in-out",
|
|
2023
2042
|
verticalAlign: 'text-top',
|
|
2024
|
-
width: header.getWidth()
|
|
2043
|
+
width: header.getWidth(),
|
|
2044
|
+
zIndex: column.getIsResizing() ? 2 : 1
|
|
2025
2045
|
}, tableCellProps == null ? void 0 : tableCellProps.sx);
|
|
2026
2046
|
}
|
|
2027
2047
|
}), header.isPlaceholder ? null : column.columnDefType === 'display' ? headerElement : React.createElement(Box, {
|
|
@@ -2042,7 +2062,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2042
2062
|
flexWrap: 'nowrap',
|
|
2043
2063
|
whiteSpace: column.header.length < 24 ? 'nowrap' : 'normal'
|
|
2044
2064
|
}
|
|
2045
|
-
}, headerElement, column.columnDefType
|
|
2065
|
+
}, headerElement, column.columnDefType === 'data' && column.getCanSort() && React.createElement(Tooltip, {
|
|
2046
2066
|
arrow: true,
|
|
2047
2067
|
placement: "top",
|
|
2048
2068
|
title: sortTooltip
|
|
@@ -2050,7 +2070,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2050
2070
|
"aria-label": sortTooltip,
|
|
2051
2071
|
active: !!column.getIsSorted(),
|
|
2052
2072
|
direction: column.getIsSorted() ? column.getIsSorted() : undefined
|
|
2053
|
-
})), column.columnDefType
|
|
2073
|
+
})), column.columnDefType === 'data' && enableColumnFilters && !!column.getCanColumnFilter() && React.createElement(Tooltip, {
|
|
2054
2074
|
arrow: true,
|
|
2055
2075
|
placement: "top",
|
|
2056
2076
|
title: filterTooltip
|
|
@@ -2071,16 +2091,10 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2071
2091
|
opacity: 0.8
|
|
2072
2092
|
}
|
|
2073
2093
|
}
|
|
2074
|
-
}, showFilters && !column.getColumnFilterValue() ? React.createElement(FilterAltOff, null) : React.createElement(FilterAltIcon, null)))), React.createElement(
|
|
2075
|
-
sx: {
|
|
2076
|
-
alignItems: 'center',
|
|
2077
|
-
display: 'flex',
|
|
2078
|
-
flexWrap: 'nowrap'
|
|
2079
|
-
}
|
|
2080
|
-
}, (enableColumnActions || column.enableColumnActions) && column.enableColumnActions !== false && column.columnDefType !== 'group' && React.createElement(MRT_ToggleColumnActionMenuButton, {
|
|
2094
|
+
}, showFilters && !column.getColumnFilterValue() ? React.createElement(FilterAltOff, null) : React.createElement(FilterAltIcon, null)))), (enableColumnActions || column.enableColumnActions) && column.enableColumnActions !== false && column.columnDefType !== 'group' && React.createElement(MRT_ToggleColumnActionMenuButton, {
|
|
2081
2095
|
header: header,
|
|
2082
2096
|
tableInstance: tableInstance
|
|
2083
|
-
}),
|
|
2097
|
+
}), column.getCanResize() && React.createElement(Divider, Object.assign({
|
|
2084
2098
|
flexItem: true,
|
|
2085
2099
|
orientation: "vertical",
|
|
2086
2100
|
onDoubleClick: function onDoubleClick() {
|
|
@@ -2088,14 +2102,19 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2088
2102
|
},
|
|
2089
2103
|
sx: function sx(theme) {
|
|
2090
2104
|
return {
|
|
2091
|
-
borderRightWidth: '2px',
|
|
2092
2105
|
borderRadius: '2px',
|
|
2093
|
-
|
|
2106
|
+
borderRightWidth: '2px',
|
|
2094
2107
|
cursor: 'col-resize',
|
|
2095
|
-
|
|
2108
|
+
height: showFilters && column.columnDefType === 'data' ? '4rem' : '2rem',
|
|
2109
|
+
opacity: 0.8,
|
|
2110
|
+
position: 'absolute',
|
|
2111
|
+
right: '1px',
|
|
2096
2112
|
touchAction: 'none',
|
|
2113
|
+
transition: 'all 0.2s ease-in-out',
|
|
2114
|
+
userSelect: 'none',
|
|
2115
|
+
zIndex: 2000,
|
|
2097
2116
|
'&:active': {
|
|
2098
|
-
backgroundColor: theme.palette.
|
|
2117
|
+
backgroundColor: theme.palette.info.main,
|
|
2099
2118
|
opacity: 1
|
|
2100
2119
|
}
|
|
2101
2120
|
};
|
|
@@ -2106,7 +2125,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2106
2125
|
transform: column.getIsResizing() ? "translateX(" + getState().columnSizingInfo.deltaOffset + "px)" : ''
|
|
2107
2126
|
}
|
|
2108
2127
|
});
|
|
2109
|
-
}))))
|
|
2128
|
+
})))), column.columnDefType === 'data' && column.getCanColumnFilter() && React.createElement(Collapse, {
|
|
2110
2129
|
"in": showFilters
|
|
2111
2130
|
}, React.createElement(MRT_FilterTextField, {
|
|
2112
2131
|
header: header,
|
|
@@ -2125,7 +2144,13 @@ var MRT_TableHeadRow = function MRT_TableHeadRow(_ref) {
|
|
|
2125
2144
|
|
|
2126
2145
|
var tableRowProps = _extends({}, headerGroup == null ? void 0 : headerGroup.getHeaderGroupProps(), mTableHeadRowProps);
|
|
2127
2146
|
|
|
2128
|
-
return React.createElement(TableRow, Object.assign({}, tableRowProps
|
|
2147
|
+
return React.createElement(TableRow, Object.assign({}, tableRowProps, {
|
|
2148
|
+
sx: function sx(theme) {
|
|
2149
|
+
return _extends({
|
|
2150
|
+
boxShadow: "4px 0 8px " + alpha(theme.palette.common.black, 0.1)
|
|
2151
|
+
}, tableRowProps == null ? void 0 : tableRowProps.sx);
|
|
2152
|
+
}
|
|
2153
|
+
}), headerGroup.headers.map(function (header, index) {
|
|
2129
2154
|
return React.createElement(MRT_TableHeadCell, {
|
|
2130
2155
|
header: header,
|
|
2131
2156
|
key: header.id || index,
|
|
@@ -2165,8 +2190,12 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2165
2190
|
tableInstance = _ref.tableInstance;
|
|
2166
2191
|
var getState = tableInstance.getState,
|
|
2167
2192
|
_tableInstance$option = tableInstance.options,
|
|
2193
|
+
idPrefix = _tableInstance$option.idPrefix,
|
|
2168
2194
|
enableEditing = _tableInstance$option.enableEditing,
|
|
2169
2195
|
muiTableBodyCellEditTextFieldProps = _tableInstance$option.muiTableBodyCellEditTextFieldProps,
|
|
2196
|
+
onCellEditBlur = _tableInstance$option.onCellEditBlur,
|
|
2197
|
+
onCellEditChange = _tableInstance$option.onCellEditChange,
|
|
2198
|
+
setCurrentEditingCell = tableInstance.setCurrentEditingCell,
|
|
2170
2199
|
setCurrentEditingRow = tableInstance.setCurrentEditingRow;
|
|
2171
2200
|
|
|
2172
2201
|
var _useState = useState(cell.value),
|
|
@@ -2183,6 +2212,11 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2183
2212
|
cell: cell,
|
|
2184
2213
|
tableInstance: tableInstance
|
|
2185
2214
|
});
|
|
2215
|
+
onCellEditChange == null ? void 0 : onCellEditChange({
|
|
2216
|
+
event: event,
|
|
2217
|
+
cell: cell,
|
|
2218
|
+
tableInstance: tableInstance
|
|
2219
|
+
});
|
|
2186
2220
|
};
|
|
2187
2221
|
|
|
2188
2222
|
var handleBlur = function handleBlur(event) {
|
|
@@ -2191,11 +2225,17 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2191
2225
|
setCurrentEditingRow(_extends({}, getState().currentEditingRow));
|
|
2192
2226
|
}
|
|
2193
2227
|
|
|
2228
|
+
setCurrentEditingCell(null);
|
|
2194
2229
|
column.onCellEditBlur == null ? void 0 : column.onCellEditBlur({
|
|
2195
2230
|
event: event,
|
|
2196
2231
|
cell: cell,
|
|
2197
2232
|
tableInstance: tableInstance
|
|
2198
2233
|
});
|
|
2234
|
+
onCellEditBlur == null ? void 0 : onCellEditBlur({
|
|
2235
|
+
event: event,
|
|
2236
|
+
cell: cell,
|
|
2237
|
+
tableInstance: tableInstance
|
|
2238
|
+
});
|
|
2199
2239
|
};
|
|
2200
2240
|
|
|
2201
2241
|
var mTableBodyCellEditTextFieldProps = muiTableBodyCellEditTextFieldProps instanceof Function ? muiTableBodyCellEditTextFieldProps({
|
|
@@ -2217,6 +2257,7 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2217
2257
|
}
|
|
2218
2258
|
|
|
2219
2259
|
return React.createElement(TextField, Object.assign({
|
|
2260
|
+
id: "mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id,
|
|
2220
2261
|
margin: "dense",
|
|
2221
2262
|
onBlur: handleBlur,
|
|
2222
2263
|
onChange: handleChange,
|
|
@@ -2277,6 +2318,7 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
|
|
|
2277
2318
|
backgroundColor: 'transparent',
|
|
2278
2319
|
border: 'none',
|
|
2279
2320
|
color: 'inherit',
|
|
2321
|
+
cursor: 'copy',
|
|
2280
2322
|
fontFamily: 'inherit',
|
|
2281
2323
|
fontSize: 'inherit',
|
|
2282
2324
|
letterSpacing: 'inherit',
|
|
@@ -2297,15 +2339,19 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2297
2339
|
var getIsSomeColumnsPinned = tableInstance.getIsSomeColumnsPinned,
|
|
2298
2340
|
getState = tableInstance.getState,
|
|
2299
2341
|
_tableInstance$option = tableInstance.options,
|
|
2342
|
+
editingMode = _tableInstance$option.editingMode,
|
|
2300
2343
|
enableClickToCopy = _tableInstance$option.enableClickToCopy,
|
|
2301
|
-
enablePinning = _tableInstance$option.enablePinning,
|
|
2302
2344
|
enableEditing = _tableInstance$option.enableEditing,
|
|
2345
|
+
enablePinning = _tableInstance$option.enablePinning,
|
|
2346
|
+
idPrefix = _tableInstance$option.idPrefix,
|
|
2303
2347
|
isLoading = _tableInstance$option.isLoading,
|
|
2304
2348
|
muiTableBodyCellProps = _tableInstance$option.muiTableBodyCellProps,
|
|
2305
2349
|
muiTableBodyCellSkeletonProps = _tableInstance$option.muiTableBodyCellSkeletonProps,
|
|
2306
|
-
onCellClick = _tableInstance$option.onCellClick
|
|
2350
|
+
onCellClick = _tableInstance$option.onCellClick,
|
|
2351
|
+
setCurrentEditingCell = tableInstance.setCurrentEditingCell;
|
|
2307
2352
|
|
|
2308
2353
|
var _getState = getState(),
|
|
2354
|
+
currentEditingCell = _getState.currentEditingCell,
|
|
2309
2355
|
currentEditingRow = _getState.currentEditingRow,
|
|
2310
2356
|
isDensePadding = _getState.isDensePadding;
|
|
2311
2357
|
|
|
@@ -2325,6 +2371,23 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2325
2371
|
var skeletonWidth = useMemo(function () {
|
|
2326
2372
|
return column.columnDefType === 'display' ? column.getWidth() / 2 : Math.random() * (column.getWidth() - column.getWidth() / 3) + column.getWidth() / 3;
|
|
2327
2373
|
}, [column.columnDefType, column.getWidth()]);
|
|
2374
|
+
var isEditable = (enableEditing || column.enableEditing) && column.enableEditing !== false;
|
|
2375
|
+
var isEditing = isEditable && (editingMode === 'table' || (currentEditingRow == null ? void 0 : currentEditingRow.id) === row.id || (currentEditingCell == null ? void 0 : currentEditingCell.id) === cell.id);
|
|
2376
|
+
|
|
2377
|
+
var handleDoubleClick = function handleDoubleClick(_event) {
|
|
2378
|
+
if ((enableEditing || column.enableEditing) && column.enableEditing !== false && editingMode === 'cell') {
|
|
2379
|
+
setCurrentEditingCell(cell);
|
|
2380
|
+
setTimeout(function () {
|
|
2381
|
+
var textField = document.getElementById("mrt-" + idPrefix + "-edit-cell-text-field-" + cell.id);
|
|
2382
|
+
|
|
2383
|
+
if (textField) {
|
|
2384
|
+
textField.focus();
|
|
2385
|
+
textField.select();
|
|
2386
|
+
}
|
|
2387
|
+
}, 200);
|
|
2388
|
+
}
|
|
2389
|
+
};
|
|
2390
|
+
|
|
2328
2391
|
return React.createElement(TableCell, Object.assign({
|
|
2329
2392
|
onClick: function onClick(event) {
|
|
2330
2393
|
return onCellClick == null ? void 0 : onCellClick({
|
|
@@ -2332,13 +2395,18 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2332
2395
|
cell: cell,
|
|
2333
2396
|
tableInstance: tableInstance
|
|
2334
2397
|
});
|
|
2335
|
-
}
|
|
2398
|
+
},
|
|
2399
|
+
onDoubleClick: handleDoubleClick
|
|
2336
2400
|
}, tableCellProps, {
|
|
2337
2401
|
sx: _extends({
|
|
2402
|
+
cursor: isEditable && editingMode === 'cell' ? 'pointer' : 'text',
|
|
2403
|
+
maxWidth: "min(" + column.getWidth() + "px, fit-content)",
|
|
2404
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2338
2405
|
p: isDensePadding ? column.columnDefType === 'display' ? '0 0.5rem' : '0.5rem' : column.columnDefType === 'display' ? '0.5rem 0.75rem' : '1rem',
|
|
2339
2406
|
pl: column.id === 'mrt-expand' ? row.depth + (isDensePadding ? 0.5 : 0.75) + "rem" : undefined,
|
|
2340
2407
|
transition: 'all 0.2s ease-in-out',
|
|
2341
|
-
whiteSpace: isDensePadding || enablePinning && getIsSomeColumnsPinned() ? 'nowrap' : 'normal'
|
|
2408
|
+
whiteSpace: isDensePadding || enablePinning && getIsSomeColumnsPinned() ? 'nowrap' : 'normal',
|
|
2409
|
+
width: column.getWidth()
|
|
2342
2410
|
}, tableCellProps == null ? void 0 : tableCellProps.sx)
|
|
2343
2411
|
}), isLoading ? React.createElement(Skeleton, Object.assign({
|
|
2344
2412
|
animation: "wave",
|
|
@@ -2347,7 +2415,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2347
2415
|
}, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.Cell == null ? void 0 : column.Cell({
|
|
2348
2416
|
cell: cell,
|
|
2349
2417
|
tableInstance: tableInstance
|
|
2350
|
-
}) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() :
|
|
2418
|
+
}) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : isEditing ? React.createElement(MRT_EditCellTextField, {
|
|
2351
2419
|
cell: cell,
|
|
2352
2420
|
tableInstance: tableInstance
|
|
2353
2421
|
}) : (enableClickToCopy || column.enableClickToCopy) && column.enableClickToCopy !== false ? React.createElement(React.Fragment, null, React.createElement(MRT_CopyButton, {
|
|
@@ -2514,8 +2582,11 @@ var MRT_TableFooterCell = function MRT_TableFooterCell(_ref) {
|
|
|
2514
2582
|
backgroundColor: theme.palette.background["default"],
|
|
2515
2583
|
backgroundImage: "linear-gradient(" + alpha(theme.palette.common.white, 0.05) + "," + alpha(theme.palette.common.white, 0.05) + ")",
|
|
2516
2584
|
fontWeight: 'bold',
|
|
2585
|
+
maxWidth: "min(" + column.getWidth() + "px, " + column.maxWidth + "px)",
|
|
2586
|
+
minWidth: "max(" + column.getWidth() + "px, " + column.minWidth + "px)",
|
|
2517
2587
|
p: isDensePadding ? '0.5rem' : '1rem',
|
|
2518
2588
|
transition: "all " + (enableColumnResizing ? '10ms' : '0.2s') + " ease-in-out",
|
|
2589
|
+
width: column.getWidth(),
|
|
2519
2590
|
verticalAlign: 'text-top'
|
|
2520
2591
|
}, tableCellProps == null ? void 0 : tableCellProps.sx);
|
|
2521
2592
|
}
|
|
@@ -2613,7 +2684,7 @@ var commonBoxStyles = function commonBoxStyles(_ref) {
|
|
|
2613
2684
|
return {
|
|
2614
2685
|
display: 'grid',
|
|
2615
2686
|
minWidth: visible ? '200px' : 0,
|
|
2616
|
-
overflowX: 'auto',
|
|
2687
|
+
overflowX: pinned ? 'scroll' : 'auto',
|
|
2617
2688
|
boxShadow: pinned === 'left' ? "0 1px 12px " + alpha(theme.palette.common.black, 0.5) : pinned === 'right' ? "0 -1px 12px " + alpha(theme.palette.common.black, 0.5) : 'none'
|
|
2618
2689
|
};
|
|
2619
2690
|
};
|
|
@@ -2792,7 +2863,7 @@ var createGroup = function createGroup(table, column, currentFilterTypes) {
|
|
|
2792
2863
|
var createDataColumn = function createDataColumn(table, column, currentFilterTypes) {
|
|
2793
2864
|
return (// @ts-ignore
|
|
2794
2865
|
table.createDataColumn(column.id, _extends({
|
|
2795
|
-
|
|
2866
|
+
filterFn: currentFilterTypes[column.id] instanceof Function ? currentFilterTypes[column.id] : defaultFilterFNs[currentFilterTypes[column.id]]
|
|
2796
2867
|
}, column))
|
|
2797
2868
|
);
|
|
2798
2869
|
};
|
|
@@ -2801,7 +2872,7 @@ var createDisplayColumn = function createDisplayColumn(table, column) {
|
|
|
2801
2872
|
};
|
|
2802
2873
|
|
|
2803
2874
|
var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
2804
|
-
var
|
|
2875
|
+
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;
|
|
2805
2876
|
|
|
2806
2877
|
var _useState = useState(props.idPrefix),
|
|
2807
2878
|
idPrefix = _useState[0],
|
|
@@ -2812,50 +2883,77 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2812
2883
|
|
|
2813
2884
|
return setIdPrefix((_props$idPrefix = props.idPrefix) != null ? _props$idPrefix : Math.random().toString(36).substring(2, 9));
|
|
2814
2885
|
}, [props.idPrefix]);
|
|
2886
|
+
var initialState = useMemo(function () {
|
|
2887
|
+
if (!props.enablePersistentState || !props.idPrefix) {
|
|
2888
|
+
return props.initialState;
|
|
2889
|
+
}
|
|
2815
2890
|
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2891
|
+
if (typeof window === 'undefined') {
|
|
2892
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2893
|
+
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');
|
|
2894
|
+
}
|
|
2895
|
+
|
|
2896
|
+
return props.initialState;
|
|
2897
|
+
}
|
|
2898
|
+
|
|
2899
|
+
var storedState = props.persistentStateMode === 'localStorage' ? localStorage.getItem("mrt-" + idPrefix + "-table-state") : props.persistentStateMode === 'sessionStorage' ? sessionStorage.getItem("mrt-" + idPrefix + "-table-state") : '{}';
|
|
2900
|
+
|
|
2901
|
+
if (storedState) {
|
|
2902
|
+
var parsedState = JSON.parse(storedState);
|
|
2819
2903
|
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2904
|
+
if (parsedState) {
|
|
2905
|
+
return _extends({}, props.initialState, parsedState);
|
|
2906
|
+
}
|
|
2907
|
+
}
|
|
2908
|
+
|
|
2909
|
+
return props.initialState;
|
|
2910
|
+
}, []);
|
|
2823
2911
|
|
|
2824
|
-
var
|
|
2825
|
-
|
|
2826
|
-
|
|
2912
|
+
var _useState2 = useState((_initialState$current = initialState == null ? void 0 : initialState.currentEditingCell) != null ? _initialState$current : null),
|
|
2913
|
+
currentEditingCell = _useState2[0],
|
|
2914
|
+
setCurrentEditingCell = _useState2[1];
|
|
2827
2915
|
|
|
2828
|
-
var
|
|
2829
|
-
|
|
2830
|
-
|
|
2916
|
+
var _useState3 = useState((_initialState$current2 = initialState == null ? void 0 : initialState.currentEditingRow) != null ? _initialState$current2 : null),
|
|
2917
|
+
currentEditingRow = _useState3[0],
|
|
2918
|
+
setCurrentEditingRow = _useState3[1];
|
|
2831
2919
|
|
|
2832
|
-
var
|
|
2833
|
-
|
|
2834
|
-
|
|
2920
|
+
var _useState4 = useState((_initialState$isDense = initialState == null ? void 0 : initialState.isDensePadding) != null ? _initialState$isDense : false),
|
|
2921
|
+
isDensePadding = _useState4[0],
|
|
2922
|
+
setIsDensePadding = _useState4[1];
|
|
2835
2923
|
|
|
2836
|
-
var
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2924
|
+
var _useState5 = useState((_initialState$isFullS = initialState == null ? void 0 : initialState.isFullScreen) != null ? _initialState$isFullS : false),
|
|
2925
|
+
isFullScreen = _useState5[0],
|
|
2926
|
+
setIsFullScreen = _useState5[1];
|
|
2927
|
+
|
|
2928
|
+
var _useState6 = useState((_initialState$showFil = initialState == null ? void 0 : initialState.showFilters) != null ? _initialState$showFil : false),
|
|
2929
|
+
showFilters = _useState6[0],
|
|
2930
|
+
setShowFilters = _useState6[1];
|
|
2931
|
+
|
|
2932
|
+
var _useState7 = useState((_initialState$showGlo = initialState == null ? void 0 : initialState.showGlobalFilter) != null ? _initialState$showGlo : false),
|
|
2933
|
+
showGlobalFilter = _useState7[0],
|
|
2934
|
+
setShowGlobalFilter = _useState7[1];
|
|
2935
|
+
|
|
2936
|
+
var _useState8 = useState({
|
|
2937
|
+
pageIndex: (_initialState$paginat = initialState == null ? void 0 : (_initialState$paginat2 = initialState.pagination) == null ? void 0 : _initialState$paginat2.pageIndex) != null ? _initialState$paginat : 0,
|
|
2938
|
+
pageSize: (_initialState$paginat3 = initialState == null ? void 0 : (_initialState$paginat4 = initialState.pagination) == null ? void 0 : _initialState$paginat4.pageSize) != null ? _initialState$paginat3 : 10,
|
|
2939
|
+
pageCount: (_initialState$paginat5 = initialState == null ? void 0 : (_initialState$paginat6 = initialState.pagination) == null ? void 0 : _initialState$paginat6.pageCount) != null ? _initialState$paginat5 : -1
|
|
2840
2940
|
}),
|
|
2841
|
-
pagination =
|
|
2842
|
-
setPagination =
|
|
2941
|
+
pagination = _useState8[0],
|
|
2942
|
+
setPagination = _useState8[1];
|
|
2843
2943
|
|
|
2844
|
-
var
|
|
2944
|
+
var _useState9 = useState(function () {
|
|
2845
2945
|
return Object.assign.apply(Object, [{}].concat(getAllLeafColumnDefs(props.columns).map(function (c) {
|
|
2846
|
-
var _ref, _c$filter,
|
|
2946
|
+
var _ref, _c$filter, _initialState$current3, _c$filterSelectOption, _ref2;
|
|
2847
2947
|
|
|
2848
|
-
return _ref2 = {}, _ref2[c.id] = (_ref = (_c$filter = c.filter) != null ? _c$filter :
|
|
2849
|
-
return cf.id === c.id;
|
|
2850
|
-
})) != null ? _ref : !!((_c$filterSelectOption = c.filterSelectOptions) != null && _c$filterSelectOption.length) ? MRT_FILTER_TYPE.EQUALS : MRT_FILTER_TYPE.BEST_MATCH, _ref2;
|
|
2948
|
+
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;
|
|
2851
2949
|
})));
|
|
2852
2950
|
}),
|
|
2853
|
-
currentFilterTypes =
|
|
2854
|
-
setCurrentFilterTypes =
|
|
2951
|
+
currentFilterTypes = _useState9[0],
|
|
2952
|
+
setCurrentFilterTypes = _useState9[1];
|
|
2855
2953
|
|
|
2856
|
-
var
|
|
2857
|
-
currentGlobalFilterType =
|
|
2858
|
-
setCurrentGlobalFilterType =
|
|
2954
|
+
var _useState10 = useState((_props$globalFilterTy = props.globalFilterType) != null ? _props$globalFilterTy : MRT_FILTER_TYPE.BEST_MATCH_FIRST),
|
|
2955
|
+
currentGlobalFilterType = _useState10[0],
|
|
2956
|
+
setCurrentGlobalFilterType = _useState10[1];
|
|
2859
2957
|
|
|
2860
2958
|
var table = useMemo(function () {
|
|
2861
2959
|
return createTable();
|
|
@@ -2863,7 +2961,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2863
2961
|
var displayColumns = useMemo(function () {
|
|
2864
2962
|
var _props$localization, _props$localization2, _props$localization3, _props$localization5;
|
|
2865
2963
|
|
|
2866
|
-
return [(props.enableRowActions || props.enableEditing) && createDisplayColumn(table, {
|
|
2964
|
+
return [(props.enableRowActions || props.enableEditing && props.editingMode === 'row') && createDisplayColumn(table, {
|
|
2867
2965
|
Cell: function Cell(_ref3) {
|
|
2868
2966
|
var cell = _ref3.cell;
|
|
2869
2967
|
return React.createElement(MRT_ToggleRowActionMenuButton, {
|
|
@@ -2926,7 +3024,7 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2926
3024
|
width: 40,
|
|
2927
3025
|
minWidth: 40
|
|
2928
3026
|
})].filter(Boolean);
|
|
2929
|
-
}, [props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
|
|
3027
|
+
}, [props.editingMode, props.enableEditing, props.enableExpandAll, props.enableExpanded, props.enableGrouping, props.enableRowActions, props.enableRowNumbers, props.enableRowSelection, props.enableSelectAll, props.localization, table]);
|
|
2930
3028
|
var columns = useMemo(function () {
|
|
2931
3029
|
return table.createColumns([].concat(displayColumns, props.columns.map(function (column) {
|
|
2932
3030
|
return column.columns ? createGroup(table, column, currentFilterTypes) : createDataColumn(table, column, currentFilterTypes);
|
|
@@ -2956,7 +3054,6 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2956
3054
|
return originalRow.subRows;
|
|
2957
3055
|
},
|
|
2958
3056
|
globalFilterType: currentGlobalFilterType,
|
|
2959
|
-
idPrefix: idPrefix,
|
|
2960
3057
|
onPaginationChange: function onPaginationChange(updater) {
|
|
2961
3058
|
return setPagination(function (old) {
|
|
2962
3059
|
return functionalUpdate(updater, old);
|
|
@@ -2965,7 +3062,11 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2965
3062
|
}, props, {
|
|
2966
3063
|
columns: columns,
|
|
2967
3064
|
data: data,
|
|
3065
|
+
idPrefix: idPrefix,
|
|
3066
|
+
//@ts-ignore
|
|
3067
|
+
initialState: initialState,
|
|
2968
3068
|
state: _extends({
|
|
3069
|
+
currentEditingCell: currentEditingCell,
|
|
2969
3070
|
currentEditingRow: currentEditingRow,
|
|
2970
3071
|
currentFilterTypes: currentFilterTypes,
|
|
2971
3072
|
currentGlobalFilterType: currentGlobalFilterType,
|
|
@@ -2977,6 +3078,9 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2977
3078
|
showGlobalFilter: showGlobalFilter
|
|
2978
3079
|
}, props.state)
|
|
2979
3080
|
})), {
|
|
3081
|
+
//@ts-ignore
|
|
3082
|
+
setCurrentEditingCell: setCurrentEditingCell,
|
|
3083
|
+
//@ts-ignore
|
|
2980
3084
|
setCurrentEditingRow: setCurrentEditingRow,
|
|
2981
3085
|
setCurrentFilterTypes: setCurrentFilterTypes,
|
|
2982
3086
|
setCurrentGlobalFilterType: setCurrentGlobalFilterType,
|
|
@@ -2986,6 +3090,28 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
2986
3090
|
setShowGlobalFilter: setShowGlobalFilter
|
|
2987
3091
|
});
|
|
2988
3092
|
|
|
3093
|
+
useEffect(function () {
|
|
3094
|
+
if (typeof window === 'undefined' || !props.enablePersistentState) {
|
|
3095
|
+
return;
|
|
3096
|
+
}
|
|
3097
|
+
|
|
3098
|
+
if (!props.idPrefix && process.env.NODE_ENV !== 'production') {
|
|
3099
|
+
console.warn('a unique idPrefix prop is required for persistent table state to work');
|
|
3100
|
+
return;
|
|
3101
|
+
}
|
|
3102
|
+
|
|
3103
|
+
var itemArgs = ["mrt-" + idPrefix + "-table-state", JSON.stringify(tableInstance.getState())];
|
|
3104
|
+
|
|
3105
|
+
if (props.persistentStateMode === 'localStorage') {
|
|
3106
|
+
var _localStorage;
|
|
3107
|
+
|
|
3108
|
+
(_localStorage = localStorage).setItem.apply(_localStorage, itemArgs);
|
|
3109
|
+
} else if (props.persistentStateMode === 'sessionStorage') {
|
|
3110
|
+
var _sessionStorage;
|
|
3111
|
+
|
|
3112
|
+
(_sessionStorage = sessionStorage).setItem.apply(_sessionStorage, itemArgs);
|
|
3113
|
+
}
|
|
3114
|
+
}, [props.enablePersistentState, props.idPrefix, props.persistentStateMode, tableInstance]);
|
|
2989
3115
|
return React.createElement(React.Fragment, null, React.createElement(Dialog, {
|
|
2990
3116
|
TransitionComponent: Grow,
|
|
2991
3117
|
PaperComponent: Box,
|
|
@@ -3004,14 +3130,20 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
3004
3130
|
}));
|
|
3005
3131
|
};
|
|
3006
3132
|
|
|
3007
|
-
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"];
|
|
3133
|
+
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"];
|
|
3008
3134
|
var MaterialReactTable = (function (_ref) {
|
|
3009
3135
|
var _ref$autoResetExpande = _ref.autoResetExpanded,
|
|
3010
3136
|
autoResetExpanded = _ref$autoResetExpande === void 0 ? false : _ref$autoResetExpande,
|
|
3137
|
+
_ref$columnResizeMode = _ref.columnResizeMode,
|
|
3138
|
+
columnResizeMode = _ref$columnResizeMode === void 0 ? 'onEnd' : _ref$columnResizeMode,
|
|
3139
|
+
_ref$editingMode = _ref.editingMode,
|
|
3140
|
+
editingMode = _ref$editingMode === void 0 ? 'row' : _ref$editingMode,
|
|
3011
3141
|
_ref$enableColumnActi = _ref.enableColumnActions,
|
|
3012
3142
|
enableColumnActions = _ref$enableColumnActi === void 0 ? true : _ref$enableColumnActi,
|
|
3013
3143
|
_ref$enableColumnFilt = _ref.enableColumnFilters,
|
|
3014
3144
|
enableColumnFilters = _ref$enableColumnFilt === void 0 ? true : _ref$enableColumnFilt,
|
|
3145
|
+
_ref$enableColumnResi = _ref.enableColumnResizing,
|
|
3146
|
+
enableColumnResizing = _ref$enableColumnResi === void 0 ? false : _ref$enableColumnResi,
|
|
3015
3147
|
_ref$enableDensePaddi = _ref.enableDensePaddingToggle,
|
|
3016
3148
|
enableDensePaddingToggle = _ref$enableDensePaddi === void 0 ? true : _ref$enableDensePaddi,
|
|
3017
3149
|
_ref$enableExpandAll = _ref.enableExpandAll,
|
|
@@ -3046,6 +3178,8 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3046
3178
|
enableToolbarTop = _ref$enableToolbarTop === void 0 ? true : _ref$enableToolbarTop,
|
|
3047
3179
|
icons = _ref.icons,
|
|
3048
3180
|
localization = _ref.localization,
|
|
3181
|
+
_ref$persistentStateM = _ref.persistentStateMode,
|
|
3182
|
+
persistentStateMode = _ref$persistentStateM === void 0 ? 'sessionStorage' : _ref$persistentStateM,
|
|
3049
3183
|
_ref$positionActionsC = _ref.positionActionsColumn,
|
|
3050
3184
|
positionActionsColumn = _ref$positionActionsC === void 0 ? 'first' : _ref$positionActionsC,
|
|
3051
3185
|
_ref$positionPaginati = _ref.positionPagination,
|
|
@@ -3058,7 +3192,10 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3058
3192
|
|
|
3059
3193
|
return React.createElement(MRT_TableRoot, Object.assign({
|
|
3060
3194
|
autoResetExpanded: autoResetExpanded,
|
|
3195
|
+
columnResizeMode: columnResizeMode,
|
|
3196
|
+
editingMode: editingMode,
|
|
3061
3197
|
enableColumnActions: enableColumnActions,
|
|
3198
|
+
enableColumnResizing: enableColumnResizing,
|
|
3062
3199
|
enableColumnFilters: enableColumnFilters,
|
|
3063
3200
|
enableDensePaddingToggle: enableDensePaddingToggle,
|
|
3064
3201
|
enableExpandAll: enableExpandAll,
|
|
@@ -3078,6 +3215,7 @@ var MaterialReactTable = (function (_ref) {
|
|
|
3078
3215
|
enableToolbarTop: enableToolbarTop,
|
|
3079
3216
|
icons: _extends({}, MRT_Default_Icons, icons),
|
|
3080
3217
|
localization: _extends({}, MRT_DefaultLocalization_EN, localization),
|
|
3218
|
+
persistentStateMode: persistentStateMode,
|
|
3081
3219
|
positionActionsColumn: positionActionsColumn,
|
|
3082
3220
|
positionPagination: positionPagination,
|
|
3083
3221
|
positionToolbarActions: positionToolbarActions,
|