sccoreui 5.7.8 → 5.7.9
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.
|
@@ -10,6 +10,7 @@ function ParentForGrid(props) {
|
|
|
10
10
|
rowData: props === null || props === void 0 ? void 0 : props.rowData,
|
|
11
11
|
columnData: props === null || props === void 0 ? void 0 : props.columnData,
|
|
12
12
|
});
|
|
13
|
+
console.log(props, 'pros in parent');
|
|
13
14
|
const [style] = (0, react_1.useState)(props.style);
|
|
14
15
|
const [api, setApi] = (0, react_1.useState)(null);
|
|
15
16
|
const [gridReadyEvent, setGridReadyEvent] = (0, react_1.useState)();
|
|
@@ -34,11 +35,14 @@ function ParentForGrid(props) {
|
|
|
34
35
|
}, []);
|
|
35
36
|
// Callback to products for getting data
|
|
36
37
|
const getData = (startRow, endRow) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
38
|
+
console.log(startRow, endRow, featureDetails, 'params sending to product');
|
|
37
39
|
const response = (yield props.getRowData(startRow, endRow, featureDetails)) || [];
|
|
40
|
+
console.log(response, 'response from call back');
|
|
38
41
|
return response.rowData;
|
|
39
42
|
});
|
|
40
43
|
// Gets call onLoad,scroll and whenever any featureDetails changed
|
|
41
44
|
const onGridReady = (params) => {
|
|
45
|
+
console.log('calling on grid ready');
|
|
42
46
|
setApi(params.api);
|
|
43
47
|
setGridReadyEvent(params);
|
|
44
48
|
console.log(params, "the Params");
|
|
@@ -47,7 +51,8 @@ function ParentForGrid(props) {
|
|
|
47
51
|
const startRow = params.startRow;
|
|
48
52
|
const endRow = params.endRow;
|
|
49
53
|
const result = yield getData(startRow, endRow);
|
|
50
|
-
|
|
54
|
+
console.log(result, 'result from callback');
|
|
55
|
+
if ((result === null || result === void 0 ? void 0 : result.length) > 0) {
|
|
51
56
|
params.successCallback(result, -1);
|
|
52
57
|
}
|
|
53
58
|
else {
|
|
@@ -70,7 +75,7 @@ function ParentForGrid(props) {
|
|
|
70
75
|
// Options that grid should have
|
|
71
76
|
const gridOptions = {
|
|
72
77
|
columnDefs: gridData.columnData,
|
|
73
|
-
rowData: gridData.rowData,
|
|
78
|
+
// rowData: gridData.rowData, // Passing row data
|
|
74
79
|
defaultColDef: defaultColDef,
|
|
75
80
|
enableRangeSelection: true,
|
|
76
81
|
suppressMenuHide: false,
|
|
@@ -89,6 +94,8 @@ function ParentForGrid(props) {
|
|
|
89
94
|
callGrid();
|
|
90
95
|
}
|
|
91
96
|
}, [featureDetails.searchedText]);
|
|
97
|
+
console.log(gridData, 'grid data');
|
|
98
|
+
console.log(featureDetails, 'feature details');
|
|
92
99
|
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ style: { height: style.height, width: style.width } }, { children: [(0, jsx_runtime_1.jsx)(advanced_feature_1.default, { featureDetails: featureDetails, setFeatureDetails: setFeatureDetails, columnData: gridData.columnData, props: props, callGrid: callGrid }), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady })] })));
|
|
93
100
|
}
|
|
94
101
|
exports.default = ParentForGrid;
|