sccoreui 5.6.12 → 5.6.13
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.
|
@@ -15,6 +15,7 @@ core_2.LicenseManager.setLicenseKey("Using_this_{AG_Grid}_Enterprise_key_{AG-056
|
|
|
15
15
|
const AgGrid = ({ gridData }) => {
|
|
16
16
|
const [rowData, setRowData] = (0, react_2.useState)(gridData.rowData);
|
|
17
17
|
const [columnDefs] = (0, react_2.useState)(gridData.columnData);
|
|
18
|
+
console.log(gridData.rowData, 'row data in ag grid');
|
|
18
19
|
const defaultColDef = (0, react_2.useMemo)(() => {
|
|
19
20
|
return {
|
|
20
21
|
flex: 1,
|
|
@@ -23,16 +24,10 @@ const AgGrid = ({ gridData }) => {
|
|
|
23
24
|
}, []);
|
|
24
25
|
// Get api call for rows
|
|
25
26
|
const onGridReady = (0, react_2.useCallback)((params) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
-
console.log(gridData, params,
|
|
27
|
+
console.log(gridData, params, "params");
|
|
28
|
+
console.log(gridData.rowData, "row data in on grid ready ");
|
|
27
29
|
setRowData(gridData === null || gridData === void 0 ? void 0 : gridData.rowData);
|
|
28
|
-
|
|
29
|
-
// await axios.get(
|
|
30
|
-
// "https://www.ag-grid.com/example-assets/olympic-winners.json"
|
|
31
|
-
// )
|
|
32
|
-
// ).data;
|
|
33
|
-
// console.log(result.length,result, "length of data");
|
|
34
|
-
// setRowData(result);
|
|
35
|
-
}), []);
|
|
30
|
+
}), [gridData.rowData]);
|
|
36
31
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "ag-theme-alpine ", style: { height: 800, width: 1200 } }, { children: (0, jsx_runtime_1.jsx)(react_1.AgGridReact, { rowData: rowData, columnDefs: columnDefs, defaultColDef: defaultColDef, onGridReady: onGridReady, enableRangeSelection: true }) })) }) }));
|
|
37
32
|
};
|
|
38
33
|
exports.default = AgGrid;
|
|
@@ -9,7 +9,7 @@ function ParentForGrid(props) {
|
|
|
9
9
|
rowData: (props === null || props === void 0 ? void 0 : props.rowData) || [],
|
|
10
10
|
columnData: props === null || props === void 0 ? void 0 : props.columnData,
|
|
11
11
|
});
|
|
12
|
-
console.log(props, "props from product");
|
|
12
|
+
console.log(props, gridData, gridData.rowData, "props from product");
|
|
13
13
|
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(AgGrid_1.default, { gridData: gridData }), (0, jsx_runtime_1.jsx)("div", { children: props === null || props === void 0 ? void 0 : props.message })] }));
|
|
14
14
|
}
|
|
15
15
|
exports.default = ParentForGrid;
|