qbs-react-grid 1.0.39 → 1.0.40
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/es/Pagination.js +4 -0
- package/es/qbsTable/QbsTable.js +1 -1
- package/lib/Pagination.js +4 -0
- package/lib/qbsTable/QbsTable.js +1 -1
- package/package.json +1 -1
- package/src/Pagination.tsx +11 -1
- package/src/qbsTable/QbsTable.tsx +1 -1
package/es/Pagination.js
CHANGED
|
@@ -4,7 +4,9 @@ var PageIndex = function PageIndex(_ref) {
|
|
|
4
4
|
var currentIndex = _ref.currentIndex,
|
|
5
5
|
handleFirst = _ref.handleFirst,
|
|
6
6
|
pageCount = _ref.pageCount;
|
|
7
|
+
console.log(currentIndex, 'insdie subfunction');
|
|
7
8
|
var renderPageNumbers = function renderPageNumbers() {
|
|
9
|
+
console.log(currentIndex, 'insdie last function');
|
|
8
10
|
var pageNumbers = [];
|
|
9
11
|
|
|
10
12
|
// Add ellipsis if necessary
|
|
@@ -86,6 +88,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
86
88
|
setCurrenIndex(currentIndex + 1);
|
|
87
89
|
onPagination === null || onPagination === void 0 ? void 0 : onPagination(currentIndex + 1, currentIndex);
|
|
88
90
|
};
|
|
91
|
+
console.log(currentIndex, 'outside function');
|
|
89
92
|
return /*#__PURE__*/React.createElement("div", {
|
|
90
93
|
className: 'qbs-table-custom-pagination',
|
|
91
94
|
style: {
|
|
@@ -135,6 +138,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
135
138
|
}))), /*#__PURE__*/React.createElement("div", {
|
|
136
139
|
className: "block-container"
|
|
137
140
|
}, /*#__PURE__*/React.createElement(PageIndex, {
|
|
141
|
+
key: currentIndex,
|
|
138
142
|
currentIndex: currentIndex,
|
|
139
143
|
handleFirst: handleFirst,
|
|
140
144
|
pageCount: pageCount
|
package/es/qbsTable/QbsTable.js
CHANGED
|
@@ -365,7 +365,7 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
365
365
|
onChange: handleCheckAll,
|
|
366
366
|
id: "checkbox-all",
|
|
367
367
|
className: "qbs-table-checkbox-input " + classes.tableCheckBoxClass,
|
|
368
|
-
checked: data.every(function (item) {
|
|
368
|
+
checked: (data === null || data === void 0 ? void 0 : data.length) > 0 && data.every(function (item) {
|
|
369
369
|
return checkedKeys === null || checkedKeys === void 0 ? void 0 : checkedKeys.includes(item.id);
|
|
370
370
|
})
|
|
371
371
|
}), /*#__PURE__*/React.createElement("label", {
|
package/lib/Pagination.js
CHANGED
|
@@ -10,7 +10,9 @@ var PageIndex = function PageIndex(_ref) {
|
|
|
10
10
|
var currentIndex = _ref.currentIndex,
|
|
11
11
|
handleFirst = _ref.handleFirst,
|
|
12
12
|
pageCount = _ref.pageCount;
|
|
13
|
+
console.log(currentIndex, 'insdie subfunction');
|
|
13
14
|
var renderPageNumbers = function renderPageNumbers() {
|
|
15
|
+
console.log(currentIndex, 'insdie last function');
|
|
14
16
|
var pageNumbers = [];
|
|
15
17
|
|
|
16
18
|
// Add ellipsis if necessary
|
|
@@ -92,6 +94,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
92
94
|
setCurrenIndex(currentIndex + 1);
|
|
93
95
|
onPagination === null || onPagination === void 0 ? void 0 : onPagination(currentIndex + 1, currentIndex);
|
|
94
96
|
};
|
|
97
|
+
console.log(currentIndex, 'outside function');
|
|
95
98
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
99
|
className: 'qbs-table-custom-pagination',
|
|
97
100
|
style: {
|
|
@@ -141,6 +144,7 @@ var Pagination = function Pagination(_ref2) {
|
|
|
141
144
|
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
142
145
|
className: "block-container"
|
|
143
146
|
}, /*#__PURE__*/_react["default"].createElement(PageIndex, {
|
|
147
|
+
key: currentIndex,
|
|
144
148
|
currentIndex: currentIndex,
|
|
145
149
|
handleFirst: handleFirst,
|
|
146
150
|
pageCount: pageCount
|
package/lib/qbsTable/QbsTable.js
CHANGED
|
@@ -372,7 +372,7 @@ var QbsTable = function QbsTable(_ref) {
|
|
|
372
372
|
onChange: handleCheckAll,
|
|
373
373
|
id: "checkbox-all",
|
|
374
374
|
className: "qbs-table-checkbox-input " + classes.tableCheckBoxClass,
|
|
375
|
-
checked: data.every(function (item) {
|
|
375
|
+
checked: (data === null || data === void 0 ? void 0 : data.length) > 0 && data.every(function (item) {
|
|
376
376
|
return checkedKeys === null || checkedKeys === void 0 ? void 0 : checkedKeys.includes(item.id);
|
|
377
377
|
})
|
|
378
378
|
}), /*#__PURE__*/_react["default"].createElement("label", {
|
package/package.json
CHANGED
package/src/Pagination.tsx
CHANGED
|
@@ -14,7 +14,10 @@ type PageProps = {
|
|
|
14
14
|
};
|
|
15
15
|
};
|
|
16
16
|
const PageIndex = ({ currentIndex, handleFirst, pageCount }) => {
|
|
17
|
+
console.log(currentIndex, 'insdie subfunction');
|
|
17
18
|
const renderPageNumbers = () => {
|
|
19
|
+
console.log(currentIndex, 'insdie last function');
|
|
20
|
+
|
|
18
21
|
const pageNumbers: any = [];
|
|
19
22
|
|
|
20
23
|
// Add ellipsis if necessary
|
|
@@ -102,6 +105,8 @@ const Pagination: FC<PageProps> = ({ paginationProps }) => {
|
|
|
102
105
|
setCurrenIndex(currentIndex + 1);
|
|
103
106
|
onPagination?.(currentIndex + 1, currentIndex);
|
|
104
107
|
};
|
|
108
|
+
console.log(currentIndex, 'outside function');
|
|
109
|
+
|
|
105
110
|
return (
|
|
106
111
|
<div
|
|
107
112
|
className={'qbs-table-custom-pagination'}
|
|
@@ -158,7 +163,12 @@ const Pagination: FC<PageProps> = ({ paginationProps }) => {
|
|
|
158
163
|
</svg>
|
|
159
164
|
</button>
|
|
160
165
|
<div className="block-container">
|
|
161
|
-
<PageIndex
|
|
166
|
+
<PageIndex
|
|
167
|
+
key={currentIndex}
|
|
168
|
+
currentIndex={currentIndex}
|
|
169
|
+
handleFirst={handleFirst}
|
|
170
|
+
pageCount={pageCount}
|
|
171
|
+
/>
|
|
162
172
|
</div>
|
|
163
173
|
<button
|
|
164
174
|
className="qbs-table-icon-container"
|
|
@@ -390,7 +390,7 @@ const QbsTable: React.FC<QbsTableProps> = ({
|
|
|
390
390
|
onChange={handleCheckAll}
|
|
391
391
|
id={`checkbox-all`}
|
|
392
392
|
className={`qbs-table-checkbox-input ${classes.tableCheckBoxClass}`}
|
|
393
|
-
checked={data.every(item => checkedKeys?.includes(item.id))}
|
|
393
|
+
checked={data?.length > 0 && data.every(item => checkedKeys?.includes(item.id))}
|
|
394
394
|
/>
|
|
395
395
|
<label htmlFor={`checkbox-all`}>
|
|
396
396
|
<svg
|