material-react-table 1.6.1 → 1.6.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/cjs/index.js
CHANGED
@@ -1126,11 +1126,12 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
1126
1126
|
: muiSelectCheckboxProps instanceof Function
|
1127
1127
|
? muiSelectCheckboxProps({ row, table })
|
1128
1128
|
: muiSelectCheckboxProps;
|
1129
|
-
const
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1129
|
+
const allRowsSelected = selectAll
|
1130
|
+
? selectAllMode === 'page'
|
1131
|
+
? table.getIsAllPageRowsSelected()
|
1132
|
+
: table.getIsAllRowsSelected()
|
1133
|
+
: undefined;
|
1134
|
+
const commonProps = Object.assign(Object.assign({ checked: selectAll ? allRowsSelected : row === null || row === void 0 ? void 0 : row.getIsSelected(), disabled: isLoading || (row && !row.getCanSelect()), inputProps: {
|
1134
1135
|
'aria-label': selectAll
|
1135
1136
|
? localization.toggleSelectAll
|
1136
1137
|
: localization.toggleSelectRow,
|
@@ -1148,10 +1149,7 @@ const MRT_SelectCheckbox = ({ row, selectAll, table }) => {
|
|
1148
1149
|
return (React__default["default"].createElement(Tooltip__default["default"], { arrow: true, enterDelay: 1000, enterNextDelay: 1000, title: (_a = checkboxProps === null || checkboxProps === void 0 ? void 0 : checkboxProps.title) !== null && _a !== void 0 ? _a : (selectAll
|
1149
1150
|
? localization.toggleSelectAll
|
1150
1151
|
: localization.toggleSelectRow) }, enableMultiRowSelection === false ? (React__default["default"].createElement(Radio__default["default"], Object.assign({}, commonProps))) : (React__default["default"].createElement(Checkbox__default["default"], Object.assign({ indeterminate: selectAll
|
1151
|
-
? table.getIsSomeRowsSelected() &&
|
1152
|
-
!(selectAllMode === 'page'
|
1153
|
-
? table.getIsAllPageRowsSelected()
|
1154
|
-
: table.getIsAllRowsSelected())
|
1152
|
+
? table.getIsSomeRowsSelected() && !allRowsSelected
|
1155
1153
|
: row === null || row === void 0 ? void 0 : row.getIsSomeSelected() }, commonProps)))));
|
1156
1154
|
};
|
1157
1155
|
|