sccoreui 6.1.16 → 6.1.17
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.
|
@@ -57,7 +57,7 @@ function ParentForGrid(props) {
|
|
|
57
57
|
checkBoxSelection: initialCheckBoxData,
|
|
58
58
|
isRemoveClicked: false,
|
|
59
59
|
});
|
|
60
|
-
const [columnToRender,
|
|
60
|
+
// const [columnToRender,setColumnToRender] = useState<ColumnDef[]>([])
|
|
61
61
|
const gridRef = (0, react_1.useRef)(null);
|
|
62
62
|
// Default column specification
|
|
63
63
|
const defaultColDef = (0, react_1.useMemo)(() => {
|
|
@@ -235,22 +235,22 @@ function ParentForGrid(props) {
|
|
|
235
235
|
const wrapperToFillOpertation = (params) => {
|
|
236
236
|
(0, helper_1.fillOperation)(params, api, props === null || props === void 0 ? void 0 : props.updateCell, initalDragRowData, props === null || props === void 0 ? void 0 : props.editedRecords, props === null || props === void 0 ? void 0 : props.setEditedRecords);
|
|
237
237
|
};
|
|
238
|
-
const returnRenderColumn =
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
}, [props
|
|
238
|
+
// const returnRenderColumn = useCallback(() => {
|
|
239
|
+
// let columnToReturn: ColumnDef[] = [];
|
|
240
|
+
// gridData.columnData.filter((column) => {
|
|
241
|
+
// props.columnData.filter((pColumn) => {
|
|
242
|
+
// if (column.id === pColumn.id || column.field === pColumn.field) {
|
|
243
|
+
// columnToReturn.push(column);
|
|
244
|
+
// }
|
|
245
|
+
// });
|
|
246
|
+
// });
|
|
247
|
+
// // setGridData({...gridData,columnData:columnToReturn})
|
|
248
|
+
// setColumnToRender(columnToReturn);
|
|
249
|
+
// // return columnToReturn
|
|
250
|
+
// }, [props?.columnData]);
|
|
251
251
|
// Options that grid should have
|
|
252
252
|
const gridOptions = {
|
|
253
|
-
columnDefs:
|
|
253
|
+
columnDefs: gridData.columnData.map((column) => {
|
|
254
254
|
var _a, _b;
|
|
255
255
|
if (column.enableChildCheckbox && column.enableHeaderCheckbox) {
|
|
256
256
|
return Object.assign(Object.assign({}, column), { headerComponent: (params) => headerCheckBoxRenderer(params), cellRenderer: (params) => dataCellRenderer(params, column), headerName: (_a = column === null || column === void 0 ? void 0 : column.headerName) === null || _a === void 0 ? void 0 : _a.toUpperCase(), cellRendererParams: {
|
|
@@ -287,9 +287,9 @@ function ParentForGrid(props) {
|
|
|
287
287
|
const callGrid = (featureDetails) => {
|
|
288
288
|
onGridReady(gridReadyEvent, featureDetails);
|
|
289
289
|
};
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
},
|
|
290
|
+
// useEffect(()=>{
|
|
291
|
+
// returnRenderColumn()
|
|
292
|
+
// },[props?.columnData])
|
|
293
293
|
// Call Grid if something is searched
|
|
294
294
|
(0, react_1.useEffect)(() => {
|
|
295
295
|
if (api && gridReadyEvent) {
|
|
@@ -358,7 +358,7 @@ function ParentForGrid(props) {
|
|
|
358
358
|
setGridData,
|
|
359
359
|
gridApi: gridRef,
|
|
360
360
|
updateColumnsForGrid: props === null || props === void 0 ? void 0 : props.updateColumnsForGrid,
|
|
361
|
-
columnToRender:
|
|
361
|
+
columnToRender: gridData.columnData,
|
|
362
362
|
} }, { children: (0, jsx_runtime_1.jsx)(advanced_feature_1.default, { props: props }) })), (0, jsx_runtime_1.jsx)(AgGrid_1.default, { style: style, gridOptions: gridOptions, onGridReady: onGridReady, gridRef: gridRef })] }) })) }) }));
|
|
363
363
|
}
|
|
364
364
|
exports.default = ParentForGrid;
|