material-react-table 0.8.0-alpha.1 → 0.8.0-alpha.2
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 +3 -0
- package/dist/material-react-table.cjs.development.js +40 -44
- 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 +41 -45
- package/dist/material-react-table.esm.js.map +1 -1
- package/package.json +5 -9
- package/src/MaterialReactTable.tsx +3 -0
- package/src/body/MRT_TableBodyCell.tsx +4 -4
- package/src/buttons/MRT_CopyButton.tsx +1 -1
- package/src/buttons/MRT_ExpandAllButton.tsx +23 -18
- package/src/buttons/MRT_ExpandButton.tsx +27 -21
- package/src/footer/MRT_TableFooterCell.tsx +10 -8
- package/src/footer/MRT_TableFooterRow.tsx +3 -2
- package/src/head/MRT_TableHeadCell.tsx +18 -10
- package/src/inputs/MRT_EditCellTextField.tsx +1 -1
- package/src/inputs/MRT_FilterTextField.tsx +4 -1
- package/src/inputs/MRT_SelectCheckbox.tsx +1 -2
- package/src/menus/MRT_ColumnActionMenu.tsx +6 -6
- package/src/menus/MRT_ShowHideColumnsMenuItems.tsx +1 -1
- package/src/table/MRT_TableRoot.tsx +1 -9
|
@@ -140,6 +140,9 @@ export declare type MRT_ColumnDef<D extends Record<string, any> = {}> = Omit<Col
|
|
|
140
140
|
};
|
|
141
141
|
export declare type MRT_Column<D extends Record<string, any> = {}> = Omit<Column<D>, 'header' | 'footer' | 'columns'> & MRT_ColumnDef<D> & {
|
|
142
142
|
columns?: MRT_Column<D>[];
|
|
143
|
+
columnDef: MRT_ColumnDef<D>;
|
|
144
|
+
header: string;
|
|
145
|
+
footer: string;
|
|
143
146
|
};
|
|
144
147
|
export declare type MRT_Header<D extends Record<string, any> = {}> = Omit<Header<D>, 'column'> & {
|
|
145
148
|
column: MRT_Column<D>;
|
|
@@ -178,13 +178,15 @@ var MRT_ExpandAllButton = function MRT_ExpandAllButton(_ref) {
|
|
|
178
178
|
toggleAllRowsExpanded = tableInstance.toggleAllRowsExpanded;
|
|
179
179
|
|
|
180
180
|
var _getState = getState(),
|
|
181
|
-
isDensePadding = _getState.isDensePadding
|
|
182
|
-
isLoading = _getState.isLoading;
|
|
181
|
+
isDensePadding = _getState.isDensePadding;
|
|
183
182
|
|
|
184
|
-
return React__default.createElement(material.
|
|
183
|
+
return React__default.createElement(material.Tooltip, {
|
|
184
|
+
arrow: true,
|
|
185
|
+
enterDelay: 1000,
|
|
186
|
+
enterNextDelay: 1000,
|
|
187
|
+
title: localization.expandAll
|
|
188
|
+
}, React__default.createElement(material.IconButton, {
|
|
185
189
|
"aria-label": localization.expandAll,
|
|
186
|
-
disabled: isLoading,
|
|
187
|
-
title: localization.expandAll,
|
|
188
190
|
onClick: function onClick() {
|
|
189
191
|
return toggleAllRowsExpanded(!getIsAllRowsExpanded());
|
|
190
192
|
},
|
|
@@ -197,7 +199,7 @@ var MRT_ExpandAllButton = function MRT_ExpandAllButton(_ref) {
|
|
|
197
199
|
transform: "rotate(" + (getIsAllRowsExpanded() ? -180 : getIsSomeRowsExpanded() ? -90 : 0) + "deg)",
|
|
198
200
|
transition: 'transform 0.2s'
|
|
199
201
|
}
|
|
200
|
-
}));
|
|
202
|
+
})));
|
|
201
203
|
};
|
|
202
204
|
|
|
203
205
|
var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
|
|
@@ -222,10 +224,14 @@ var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
|
|
|
222
224
|
});
|
|
223
225
|
};
|
|
224
226
|
|
|
225
|
-
return React__default.createElement(material.
|
|
227
|
+
return React__default.createElement(material.Tooltip, {
|
|
228
|
+
arrow: true,
|
|
229
|
+
enterDelay: 1000,
|
|
230
|
+
enterNextDelay: 1000,
|
|
231
|
+
title: localization.expand
|
|
232
|
+
}, React__default.createElement(material.IconButton, {
|
|
226
233
|
"aria-label": localization.expand,
|
|
227
234
|
disabled: !row.getCanExpand() && !renderDetailPanel,
|
|
228
|
-
title: localization.expand,
|
|
229
235
|
onClick: handleToggleExpand,
|
|
230
236
|
sx: {
|
|
231
237
|
height: isDensePadding ? '1.75rem' : '2.25rem',
|
|
@@ -236,7 +242,7 @@ var MRT_ExpandButton = function MRT_ExpandButton(_ref) {
|
|
|
236
242
|
transform: "rotate(" + (!row.getCanExpand() && !renderDetailPanel ? -90 : row.getIsExpanded() ? -180 : 0) + "deg)",
|
|
237
243
|
transition: 'transform 0.2s'
|
|
238
244
|
}
|
|
239
|
-
}));
|
|
245
|
+
})));
|
|
240
246
|
};
|
|
241
247
|
|
|
242
248
|
var MRT_FILTER_OPTION;
|
|
@@ -606,7 +612,7 @@ var MRT_ShowHideColumnsMenuItems = function MRT_ShowHideColumnsMenuItems(_ref) {
|
|
|
606
612
|
checked: switchChecked,
|
|
607
613
|
control: React__default.createElement(material.Switch, null),
|
|
608
614
|
disabled: isSubMenu && switchChecked || !column.getCanHide(),
|
|
609
|
-
label: column.header,
|
|
615
|
+
label: column.columnDef.header,
|
|
610
616
|
onChange: function onChange() {
|
|
611
617
|
return handleToggleColumnHidden(column);
|
|
612
618
|
}
|
|
@@ -860,7 +866,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
860
866
|
sx: commonMenuItemStyles$1
|
|
861
867
|
}, React__default.createElement(material.Box, {
|
|
862
868
|
sx: commonListItemStyles
|
|
863
|
-
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(SortIcon, null)), (_localization$sortByC = localization.sortByColumnAsc) == null ? void 0 : _localization$sortByC.replace('{column}', String(column.header)))), React__default.createElement(material.MenuItem, {
|
|
869
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(SortIcon, null)), (_localization$sortByC = localization.sortByColumnAsc) == null ? void 0 : _localization$sortByC.replace('{column}', String(column.columnDef.header)))), React__default.createElement(material.MenuItem, {
|
|
864
870
|
divider: enableColumnFilters || enableGrouping || enableHiding,
|
|
865
871
|
key: 2,
|
|
866
872
|
disabled: column.getIsSorted() === 'desc',
|
|
@@ -872,7 +878,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
872
878
|
style: {
|
|
873
879
|
transform: 'rotate(180deg) scaleX(-1)'
|
|
874
880
|
}
|
|
875
|
-
})), (_localization$sortByC2 = localization.sortByColumnDesc) == null ? void 0 : _localization$sortByC2.replace('{column}', String(column.header))))], enableColumnFilters && column.getCanFilter() && [React__default.createElement(material.MenuItem, {
|
|
881
|
+
})), (_localization$sortByC2 = localization.sortByColumnDesc) == null ? void 0 : _localization$sortByC2.replace('{column}', String(column.columnDef.header))))], enableColumnFilters && column.getCanFilter() && [React__default.createElement(material.MenuItem, {
|
|
876
882
|
disabled: !column.getFilterValue(),
|
|
877
883
|
key: 0,
|
|
878
884
|
onClick: handleClearFilter,
|
|
@@ -886,7 +892,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
886
892
|
sx: commonMenuItemStyles$1
|
|
887
893
|
}, React__default.createElement(material.Box, {
|
|
888
894
|
sx: commonListItemStyles
|
|
889
|
-
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(FilterListIcon, null)), (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.header))), !column.filterSelectOptions && React__default.createElement(material.IconButton, {
|
|
895
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(FilterListIcon, null)), (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.columnDef.header))), !column.filterSelectOptions && React__default.createElement(material.IconButton, {
|
|
890
896
|
onClick: handleOpenFilterModeMenu,
|
|
891
897
|
onMouseEnter: handleOpenFilterModeMenu,
|
|
892
898
|
size: "small",
|
|
@@ -907,7 +913,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
907
913
|
sx: commonMenuItemStyles$1
|
|
908
914
|
}, React__default.createElement(material.Box, {
|
|
909
915
|
sx: commonListItemStyles
|
|
910
|
-
}, 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, {
|
|
916
|
+
}, 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.columnDef.header))))], enablePinning && column.getCanPin() && [React__default.createElement(material.MenuItem, {
|
|
911
917
|
disabled: column.getIsPinned() === 'left' || !column.getCanPin(),
|
|
912
918
|
key: 0,
|
|
913
919
|
onClick: function onClick() {
|
|
@@ -957,7 +963,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
957
963
|
sx: commonMenuItemStyles$1
|
|
958
964
|
}, React__default.createElement(material.Box, {
|
|
959
965
|
sx: commonListItemStyles
|
|
960
|
-
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(VisibilityOffIcon, null)), (_localization$hideCol = localization.hideColumn) == null ? void 0 : _localization$hideCol.replace('{column}', String(column.header)))), React__default.createElement(material.MenuItem, {
|
|
966
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(VisibilityOffIcon, null)), (_localization$hideCol = localization.hideColumn) == null ? void 0 : _localization$hideCol.replace('{column}', String(column.columnDef.header)))), React__default.createElement(material.MenuItem, {
|
|
961
967
|
disabled: !Object.values(columnVisibility).filter(function (visible) {
|
|
962
968
|
return !visible;
|
|
963
969
|
}).length,
|
|
@@ -966,7 +972,7 @@ var MRT_ColumnActionMenu = function MRT_ColumnActionMenu(_ref) {
|
|
|
966
972
|
sx: commonMenuItemStyles$1
|
|
967
973
|
}, React__default.createElement(material.Box, {
|
|
968
974
|
sx: commonListItemStyles
|
|
969
|
-
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(ViewColumnIcon, null)), (_localization$showAll = localization.showAllColumns) == null ? void 0 : _localization$showAll.replace('{column}', String(column.header))), React__default.createElement(material.IconButton, {
|
|
975
|
+
}, React__default.createElement(material.ListItemIcon, null, React__default.createElement(ViewColumnIcon, null)), (_localization$showAll = localization.showAllColumns) == null ? void 0 : _localization$showAll.replace('{column}', String(column.columnDef.header))), React__default.createElement(material.IconButton, {
|
|
970
976
|
onClick: handleOpenShowHideColumnsMenu,
|
|
971
977
|
onMouseEnter: handleOpenShowHideColumnsMenu,
|
|
972
978
|
size: "small",
|
|
@@ -1160,8 +1166,7 @@ var MRT_SelectCheckbox = function MRT_SelectCheckbox(_ref) {
|
|
|
1160
1166
|
onSelectAllChange = _tableInstance$option.onSelectAllChange;
|
|
1161
1167
|
|
|
1162
1168
|
var _getState = getState(),
|
|
1163
|
-
isDensePadding = _getState.isDensePadding
|
|
1164
|
-
isLoading = _getState.isLoading;
|
|
1169
|
+
isDensePadding = _getState.isDensePadding;
|
|
1165
1170
|
|
|
1166
1171
|
var handleSelectChange = function handleSelectChange(event) {
|
|
1167
1172
|
if (selectAll) {
|
|
@@ -1196,7 +1201,6 @@ var MRT_SelectCheckbox = function MRT_SelectCheckbox(_ref) {
|
|
|
1196
1201
|
title: selectAll ? localization.toggleSelectAll : localization.toggleSelectRow
|
|
1197
1202
|
}, React__default.createElement(material.Checkbox, Object.assign({
|
|
1198
1203
|
checked: selectAll ? tableInstance.getIsAllRowsSelected() : row == null ? void 0 : row.getIsSelected(),
|
|
1199
|
-
disabled: isLoading,
|
|
1200
1204
|
indeterminate: selectAll ? tableInstance.getIsSomeRowsSelected() : row == null ? void 0 : row.getIsSomeSelected(),
|
|
1201
1205
|
inputProps: {
|
|
1202
1206
|
'aria-label': selectAll ? localization.toggleSelectAll : localization.toggleSelectRow
|
|
@@ -1881,7 +1885,7 @@ var MRT_FilterTextField = function MRT_FilterTextField(_ref) {
|
|
|
1881
1885
|
var isSelectFilter = !!column.filterSelectOptions;
|
|
1882
1886
|
var filterChipLabel = !(filterFn instanceof Function) && [MRT_FILTER_OPTION.EMPTY, MRT_FILTER_OPTION.NOT_EMPTY].includes(filterFn) ? //@ts-ignore
|
|
1883
1887
|
localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))] : '';
|
|
1884
|
-
var filterPlaceholder = inputIndex === undefined ? (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.header)) : inputIndex === 0 ? localization.min : inputIndex === 1 ? localization.max : '';
|
|
1888
|
+
var filterPlaceholder = inputIndex === undefined ? (_localization$filterB = localization.filterByColumn) == null ? void 0 : _localization$filterB.replace('{column}', String(column.columnDef.header)) : inputIndex === 0 ? localization.min : inputIndex === 1 ? localization.max : '';
|
|
1885
1889
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.TextField, Object.assign({
|
|
1886
1890
|
fullWidth: true,
|
|
1887
1891
|
id: filterId,
|
|
@@ -2080,7 +2084,7 @@ var MRT_FilterRangeFields = function MRT_FilterRangeFields(_ref) {
|
|
|
2080
2084
|
};
|
|
2081
2085
|
|
|
2082
2086
|
var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
2083
|
-
var _getState2, _getState2$currentFil, _column$
|
|
2087
|
+
var _getState2, _getState2$currentFil, _column$columnDef$Hea, _column$columnDef, _column$columnDef$hea, _column$columnDef$hea2;
|
|
2084
2088
|
|
|
2085
2089
|
var header = _ref.header,
|
|
2086
2090
|
tableInstance = _ref.tableInstance;
|
|
@@ -2113,14 +2117,14 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2113
2117
|
|
|
2114
2118
|
var tableCellProps = _extends({}, mTableHeadCellProps, mcTableHeadCellProps);
|
|
2115
2119
|
|
|
2116
|
-
var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.sortedByColumnDesc.replace('{column}', column.header) : localization.sortedByColumnAsc.replace('{column}', column.header) : localization.unsorted;
|
|
2120
|
+
var sortTooltip = !!column.getIsSorted() ? column.getIsSorted() === 'desc' ? localization.sortedByColumnDesc.replace('{column}', column.columnDef.header) : localization.sortedByColumnAsc.replace('{column}', column.columnDef.header) : localization.unsorted;
|
|
2117
2121
|
var filterFn = (_getState2 = getState()) == null ? void 0 : (_getState2$currentFil = _getState2.currentFilterFns) == null ? void 0 : _getState2$currentFil[header.id];
|
|
2118
|
-
var filterTooltip = !!column.getFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.header)).replace('{filterType}', filterFn instanceof Function ? '' : // @ts-ignore
|
|
2122
|
+
var filterTooltip = !!column.getFilterValue() ? localization.filteringByColumn.replace('{column}', String(column.columnDef.header)).replace('{filterType}', filterFn instanceof Function ? '' : // @ts-ignore
|
|
2119
2123
|
localization["filter" + (filterFn.charAt(0).toUpperCase() + filterFn.slice(1))]).replace('{filterValue}', "\"" + (Array.isArray(column.getFilterValue()) ? column.getFilterValue().join("\" " + localization.and + " \"") : column.getFilterValue()) + "\"").replace('" "', '') : localization.showHideFilters;
|
|
2120
|
-
var headerElement = (_column$
|
|
2124
|
+
var headerElement = (_column$columnDef$Hea = (_column$columnDef = column.columnDef) == null ? void 0 : _column$columnDef.Header == null ? void 0 : _column$columnDef.Header({
|
|
2121
2125
|
header: header,
|
|
2122
2126
|
tableInstance: tableInstance
|
|
2123
|
-
})) != null ? _column$
|
|
2127
|
+
})) != null ? _column$columnDef$Hea : header.renderHeader();
|
|
2124
2128
|
|
|
2125
2129
|
var getIsLastLeftPinnedColumn = function getIsLastLeftPinnedColumn() {
|
|
2126
2130
|
return column.getIsPinned() === 'left' && tableInstance.getLeftLeafHeaders().length - 1 === column.getPinnedIndex();
|
|
@@ -2176,7 +2180,7 @@ var MRT_TableHeadCell = function MRT_TableHeadCell(_ref) {
|
|
|
2176
2180
|
cursor: column.getCanSort() && column.columnDefType !== 'group' ? 'pointer' : undefined,
|
|
2177
2181
|
display: 'flex',
|
|
2178
2182
|
flexWrap: 'nowrap',
|
|
2179
|
-
whiteSpace: column.header.length < 24 ? 'nowrap' : 'normal'
|
|
2183
|
+
whiteSpace: ((_column$columnDef$hea = (_column$columnDef$hea2 = column.columnDef.header) == null ? void 0 : _column$columnDef$hea2.length) != null ? _column$columnDef$hea : 0) < 24 ? 'nowrap' : 'normal'
|
|
2180
2184
|
}
|
|
2181
2185
|
}, headerElement, column.columnDefType === 'data' && column.getCanSort() && React__default.createElement(material.Tooltip, {
|
|
2182
2186
|
arrow: true,
|
|
@@ -2374,7 +2378,7 @@ var MRT_EditCellTextField = function MRT_EditCellTextField(_ref) {
|
|
|
2374
2378
|
onClick: function onClick(e) {
|
|
2375
2379
|
return e.stopPropagation();
|
|
2376
2380
|
},
|
|
2377
|
-
placeholder: column.header,
|
|
2381
|
+
placeholder: column.columnDef.header,
|
|
2378
2382
|
value: value,
|
|
2379
2383
|
variant: "standard"
|
|
2380
2384
|
}, textFieldProps));
|
|
@@ -2442,7 +2446,7 @@ var MRT_CopyButton = function MRT_CopyButton(_ref) {
|
|
|
2442
2446
|
};
|
|
2443
2447
|
|
|
2444
2448
|
var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
2445
|
-
var _cell$column$
|
|
2449
|
+
var _cell$column$columnDe, _cell$column$columnDe2, _row$subRows, _cell$column$columnDe3, _cell$column$columnDe4, _row$subRows$length, _row$subRows2;
|
|
2446
2450
|
|
|
2447
2451
|
var cell = _ref.cell,
|
|
2448
2452
|
enableHover = _ref.enableHover,
|
|
@@ -2545,7 +2549,7 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2545
2549
|
animation: "wave",
|
|
2546
2550
|
height: 20,
|
|
2547
2551
|
width: skeletonWidth
|
|
2548
|
-
}, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.Cell == null ? void 0 : column.Cell({
|
|
2552
|
+
}, muiTableBodyCellSkeletonProps)) : column.columnDefType === 'display' ? column.columnDef.Cell == null ? void 0 : column.columnDef.Cell({
|
|
2549
2553
|
cell: cell,
|
|
2550
2554
|
tableInstance: tableInstance
|
|
2551
2555
|
}) : cell.getIsPlaceholder() || row.getIsGrouped() && column.id !== row.groupingColumnId ? null : cell.getIsAggregated() ? cell.renderAggregatedCell() : isEditing ? React__default.createElement(MRT_EditCellTextField, {
|
|
@@ -2554,13 +2558,13 @@ var MRT_TableBodyCell = function MRT_TableBodyCell(_ref) {
|
|
|
2554
2558
|
}) : (enableClickToCopy || column.enableClickToCopy) && column.enableClickToCopy !== false ? React__default.createElement(React__default.Fragment, null, React__default.createElement(MRT_CopyButton, {
|
|
2555
2559
|
cell: cell,
|
|
2556
2560
|
tableInstance: tableInstance
|
|
2557
|
-
}, React__default.createElement(React__default.Fragment, null, (_cell$column$
|
|
2561
|
+
}, React__default.createElement(React__default.Fragment, null, (_cell$column$columnDe = (_cell$column$columnDe2 = cell.column.columnDef) == null ? void 0 : _cell$column$columnDe2.Cell == null ? void 0 : _cell$column$columnDe2.Cell({
|
|
2558
2562
|
cell: cell,
|
|
2559
2563
|
tableInstance: tableInstance
|
|
2560
|
-
})) != null ? _cell$column$
|
|
2564
|
+
})) != null ? _cell$column$columnDe : cell.renderCell())), row.getIsGrouped() && React__default.createElement(React__default.Fragment, null, " (", (_row$subRows = row.subRows) == null ? void 0 : _row$subRows.length, ")")) : React__default.createElement(React__default.Fragment, null, (_cell$column$columnDe3 = (_cell$column$columnDe4 = cell.column.columnDef) == null ? void 0 : _cell$column$columnDe4.Cell == null ? void 0 : _cell$column$columnDe4.Cell({
|
|
2561
2565
|
cell: cell,
|
|
2562
2566
|
tableInstance: tableInstance
|
|
2563
|
-
})) != null ? _cell$column$
|
|
2567
|
+
})) != null ? _cell$column$columnDe3 : cell.renderCell(), row.getIsGrouped() && React__default.createElement(React__default.Fragment, null, " (", (_row$subRows$length = (_row$subRows2 = row.subRows) == null ? void 0 : _row$subRows2.length) != null ? _row$subRows$length : '', ")"))));
|
|
2564
2568
|
};
|
|
2565
2569
|
|
|
2566
2570
|
var MRT_TableDetailPanel = function MRT_TableDetailPanel(_ref) {
|
|
@@ -2669,7 +2673,7 @@ var MRT_TableBody = function MRT_TableBody(_ref) {
|
|
|
2669
2673
|
};
|
|
2670
2674
|
|
|
2671
2675
|
var MRT_TableFooterCell = function MRT_TableFooterCell(_ref) {
|
|
2672
|
-
var _ref2, _column$
|
|
2676
|
+
var _ref2, _column$columnDef$Foo;
|
|
2673
2677
|
|
|
2674
2678
|
var footer = _ref.footer,
|
|
2675
2679
|
tableInstance = _ref.tableInstance;
|
|
@@ -2711,10 +2715,10 @@ var MRT_TableFooterCell = function MRT_TableFooterCell(_ref) {
|
|
|
2711
2715
|
verticalAlign: 'text-top'
|
|
2712
2716
|
}, tableCellProps == null ? void 0 : tableCellProps.sx);
|
|
2713
2717
|
}
|
|
2714
|
-
}), footer.isPlaceholder ? null : (_ref2 = (_column$
|
|
2718
|
+
}), React__default.createElement(React__default.Fragment, null, footer.isPlaceholder ? null : (_ref2 = (_column$columnDef$Foo = column.columnDef.Footer == null ? void 0 : column.columnDef.Footer({
|
|
2715
2719
|
footer: footer,
|
|
2716
2720
|
tableInstance: tableInstance
|
|
2717
|
-
})) != null ? _column$
|
|
2721
|
+
})) != null ? _column$columnDef$Foo : footer.renderFooter()) != null ? _ref2 : null));
|
|
2718
2722
|
};
|
|
2719
2723
|
|
|
2720
2724
|
var MRT_TableFooterRow = function MRT_TableFooterRow(_ref) {
|
|
@@ -2725,7 +2729,7 @@ var MRT_TableFooterRow = function MRT_TableFooterRow(_ref) {
|
|
|
2725
2729
|
var muiTableFooterRowProps = tableInstance.options.muiTableFooterRowProps; // if no content in row, skip row
|
|
2726
2730
|
|
|
2727
2731
|
if (!((_footerGroup$headers = footerGroup.headers) != null && _footerGroup$headers.some(function (h) {
|
|
2728
|
-
return typeof h.column.footer === 'string' && !!h.column.footer || h.column.Footer;
|
|
2732
|
+
return typeof h.column.columnDef.footer === 'string' && !!h.column.columnDef.footer || h.column.columnDef.Footer;
|
|
2729
2733
|
}))) return null;
|
|
2730
2734
|
var tableRowProps = muiTableFooterRowProps instanceof Function ? muiTableFooterRowProps({
|
|
2731
2735
|
footerGroup: footerGroup,
|
|
@@ -3081,21 +3085,13 @@ var MRT_TableRoot = function MRT_TableRoot(props) {
|
|
|
3081
3085
|
|
|
3082
3086
|
var tableInstance = _extends({}, reactTable.useTableInstance(table, _extends({
|
|
3083
3087
|
filterFns: defaultFilterFNs,
|
|
3084
|
-
//@ts-ignore
|
|
3085
3088
|
getCoreRowModel: reactTable.getCoreRowModel(),
|
|
3086
|
-
//@ts-ignore
|
|
3087
3089
|
getExpandedRowModel: reactTable.getExpandedRowModel(),
|
|
3088
|
-
//@ts-ignore
|
|
3089
3090
|
getFacetedRowModel: reactTable.getFacetedRowModel(),
|
|
3090
|
-
//@ts-ignore
|
|
3091
3091
|
getFilteredRowModel: reactTable.getFilteredRowModel(),
|
|
3092
|
-
//@ts-ignore
|
|
3093
3092
|
getGroupedRowModel: reactTable.getGroupedRowModel(),
|
|
3094
|
-
//@ts-ignore
|
|
3095
3093
|
getPaginationRowModel: reactTable.getPaginationRowModel(),
|
|
3096
|
-
//@ts-ignore
|
|
3097
3094
|
getSortedRowModel: reactTable.getSortedRowModel(),
|
|
3098
|
-
//@ts-ignore
|
|
3099
3095
|
getSubRows: function getSubRows(row) {
|
|
3100
3096
|
return row == null ? void 0 : row.subRows;
|
|
3101
3097
|
},
|