@coreui/react-pro 4.11.1 → 4.11.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/README.md +1 -1
- package/dist/index.es.js +3 -19
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3 -19
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/form/CFormCheck.tsx +1 -1
- package/src/components/smart-table/CSmartTable.tsx +1 -1
- package/src/components/smart-table/CSmartTableHead.tsx +5 -12
- package/src/components/smart-table/utils.ts +0 -7
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
Several quick start options are available:
|
|
44
44
|
|
|
45
|
-
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.11.
|
|
45
|
+
- [Download the latest release](https://github.com/coreui/coreui-react-pro/archive/v4.11.2.zip)
|
|
46
46
|
- Clone the repo: `git clone https://github.com/coreui/coreui-react.git`
|
|
47
47
|
- Install with [npm](https://www.npmjs.com/): `npm install @coreui/react`
|
|
48
48
|
- Install with [yarn](https://yarnpkg.com/): `yarn add @coreui/react`
|
package/dist/index.es.js
CHANGED
|
@@ -7297,7 +7297,7 @@ var CFormCheck = forwardRef(function (_a, ref) {
|
|
|
7297
7297
|
if (inputRef.current && indeterminate) {
|
|
7298
7298
|
inputRef.current.indeterminate = indeterminate;
|
|
7299
7299
|
}
|
|
7300
|
-
}, [indeterminate]);
|
|
7300
|
+
}, [indeterminate, inputRef.current]);
|
|
7301
7301
|
var FormControl = function () { return (React__default$1.createElement("input", __assign$1({ type: type, className: classNames$1(button ? 'btn-check' : 'form-check-input', {
|
|
7302
7302
|
'is-invalid': invalid,
|
|
7303
7303
|
'is-valid': valid,
|
|
@@ -13844,12 +13844,6 @@ var getColumnLabel = function (column) {
|
|
|
13844
13844
|
: pretifyName(column.key)
|
|
13845
13845
|
: pretifyName(column);
|
|
13846
13846
|
};
|
|
13847
|
-
// export const getColumnNames = (columns: (string | Column)[] | undefined, items: Item[]) =>
|
|
13848
|
-
// columns
|
|
13849
|
-
// ? columns.map((column: Column | string) => {
|
|
13850
|
-
// return typeof column === 'object' ? column.key : column
|
|
13851
|
-
// })
|
|
13852
|
-
// : getColumnNamesFromItems(items)
|
|
13853
13847
|
var getColumnNames = function (columns, items) {
|
|
13854
13848
|
if (columns) {
|
|
13855
13849
|
var _columns = [];
|
|
@@ -14091,16 +14085,6 @@ var CSmartTableHead = forwardRef(function (_a, ref) {
|
|
|
14091
14085
|
var _d = useState(false), refresh = _d[0], setRefresh = _d[1];
|
|
14092
14086
|
var _columns = useMemo(function () { return getColumns(columns); }, [columns]);
|
|
14093
14087
|
var groups = useMemo(function () { return getColumnGroups(columns); }, [columns]);
|
|
14094
|
-
useEffect(function () {
|
|
14095
|
-
if (selectedAll === 'indeterminate') {
|
|
14096
|
-
if (selectAllcheckboxRef.current)
|
|
14097
|
-
selectAllcheckboxRef.current.indeterminate = true;
|
|
14098
|
-
}
|
|
14099
|
-
else {
|
|
14100
|
-
if (selectAllcheckboxRef.current)
|
|
14101
|
-
selectAllcheckboxRef.current.indeterminate = false;
|
|
14102
|
-
}
|
|
14103
|
-
}, [selectedAll]);
|
|
14104
14088
|
useEffect(function () {
|
|
14105
14089
|
if (columnFilterState && Object.keys(columnFilterState).length === 0) {
|
|
14106
14090
|
setRefresh(true);
|
|
@@ -14134,7 +14118,7 @@ var CSmartTableHead = forwardRef(function (_a, ref) {
|
|
|
14134
14118
|
selectable && React__default$1.createElement(CTableHeaderCell, null),
|
|
14135
14119
|
row.map(function (cell, index) { return (React__default$1.createElement(CTableHeaderCell, __assign$1({ colSpan: cell.colspan }, getTableHeaderCellProps(cell), { key: index }), cell.label)); }))); }),
|
|
14136
14120
|
React__default$1.createElement(CTableRow, null,
|
|
14137
|
-
selectable && (React__default$1.createElement(CTableHeaderCell, null, selectAll && (React__default$1.createElement(CFormCheck, { checked: typeof selectedAll === 'boolean' ? selectedAll : false, onChange: function () { return handleSelectAllChecked && handleSelectAllChecked(); }, ref: selectAllcheckboxRef })))),
|
|
14121
|
+
selectable && (React__default$1.createElement(CTableHeaderCell, null, selectAll && (React__default$1.createElement(CFormCheck, { checked: typeof selectedAll === 'boolean' ? selectedAll : false, indeterminate: selectedAll === 'indeterminate' ? true : false, onChange: function () { return handleSelectAllChecked && handleSelectAllChecked(); }, ref: selectAllcheckboxRef })))),
|
|
14138
14122
|
_columns.map(function (column, index) {
|
|
14139
14123
|
return (React__default$1.createElement(CTableHeaderCell, __assign$1({}, getTableHeaderCellProps(column), { onClick: function () { return handleSort && handleSort(getColumnKey(column), index); }, style: getTableHeaderCellStyles(column, columnSorter), key: index }),
|
|
14140
14124
|
React__default$1.createElement("div", { className: "d-inline" }, getColumnLabel(column)),
|
|
@@ -14326,7 +14310,7 @@ var CSmartTable = forwardRef(function (_a, ref) {
|
|
|
14326
14310
|
if (selectAll && typeof selectAll === 'object' && selectAll.external) {
|
|
14327
14311
|
return;
|
|
14328
14312
|
}
|
|
14329
|
-
setSelected(_items.map(function (item) {
|
|
14313
|
+
setSelected(__assign$1({}, _items).map(function (item) {
|
|
14330
14314
|
delete item['_cellProps'];
|
|
14331
14315
|
delete item['_props'];
|
|
14332
14316
|
delete item['_selected'];
|