sccoreui 5.8.2 → 5.8.3

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.
@@ -92,13 +92,13 @@ function ParentForGrid(props) {
92
92
  };
93
93
  // Callback to products for getting data
94
94
  const getData = (startRow, endRow, currentFeatures) => tslib_1.__awaiter(this, void 0, void 0, function* () {
95
- var _a, _b;
96
95
  if (!(props === null || props === void 0 ? void 0 : props.getRowData)) {
97
96
  return emptyResponse; // If callback function to get row data is not provided
98
97
  }
99
98
  const response = yield props.getRowData(startRow, endRow, currentFeatures);
100
99
  // To identify when to stop the callBack
101
- const actualEndRow = startRow + ((_b = (_a = response === null || response === void 0 ? void 0 : response.rowData) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
100
+ // const actualEndRow = startRow + (response?.rowData?.length ?? 0);
101
+ const actualEndRow = response === null || response === void 0 ? void 0 : response.totalRecords;
102
102
  if (response === null || response === void 0 ? void 0 : response.rowData) {
103
103
  setTotalRecords(response === null || response === void 0 ? void 0 : response.totalRecords);
104
104
  setGridData((prevState) => (Object.assign(Object.assign({}, prevState), { rowData: [...(prevState.rowData || []), ...response.rowData] })));
@@ -125,11 +125,11 @@ function ParentForGrid(props) {
125
125
  else if (props.rowModelType === constants_1.ROWMODELTYPE.INFINITE) {
126
126
  const dataSource = {
127
127
  getRows: (params) => tslib_1.__awaiter(this, void 0, void 0, function* () {
128
- var _c;
128
+ var _a;
129
129
  const startRow = params.startRow;
130
130
  const endRow = params.endRow;
131
131
  const result = yield getData(startRow, endRow, currentFeatures);
132
- if (((_c = result === null || result === void 0 ? void 0 : result.rowData) === null || _c === void 0 ? void 0 : _c.length) > 0) {
132
+ if (((_a = result === null || result === void 0 ? void 0 : result.rowData) === null || _a === void 0 ? void 0 : _a.length) > 0) {
133
133
  params.successCallback(result === null || result === void 0 ? void 0 : result.rowData, result === null || result === void 0 ? void 0 : result.actualEndRow);
134
134
  }
135
135
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "5.8.2",
3
+ "version": "5.8.3",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",