sccoreui 6.1.53 → 6.1.54
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.
|
@@ -105,9 +105,10 @@ function ParentForGrid(props) {
|
|
|
105
105
|
setFeatureDetails(Object.assign(Object.assign({}, featureDetails), { checkBoxSelection: checkboxData }));
|
|
106
106
|
};
|
|
107
107
|
// JSX for rendering checkbox in header
|
|
108
|
-
const headerCheckBoxRenderer = (params) => {
|
|
108
|
+
const headerCheckBoxRenderer = (params, column) => {
|
|
109
109
|
const displayName = params === null || params === void 0 ? void 0 : params.displayName;
|
|
110
|
-
|
|
110
|
+
const HeaderComponent = column === null || column === void 0 ? void 0 : column.headerComponent;
|
|
111
|
+
return ((0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex align-items-center " }, { children: [(0, jsx_runtime_1.jsx)(grid_checkbox_1.default, { checked: featureDetails.checkBoxSelection.allBoxChecked, onChange: handleHeaderCheckbox, isIndeterminate: featureDetails.checkBoxSelection.isIndeterminate }), HeaderComponent ? (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "px-3" }, { children: [" ", (0, jsx_runtime_1.jsx)(HeaderComponent, {}), " "] })) : (0, jsx_runtime_1.jsx)("span", Object.assign({ className: "px-3" }, { children: displayName }))] })));
|
|
111
112
|
};
|
|
112
113
|
// JSX for rendering checkbox in cells
|
|
113
114
|
const cellCheckBoxRenderer = (params) => {
|
|
@@ -231,7 +232,7 @@ function ParentForGrid(props) {
|
|
|
231
232
|
columnDefs: gridData.columnData.map((column) => {
|
|
232
233
|
var _a, _b;
|
|
233
234
|
if (column.enableChildCheckbox && column.enableHeaderCheckbox) {
|
|
234
|
-
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: {
|
|
235
|
+
return Object.assign(Object.assign({}, column), { headerComponent: (params) => headerCheckBoxRenderer(params, column), 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: {
|
|
235
236
|
initialRenderer: (column === null || column === void 0 ? void 0 : column.cellRenderer) ? column === null || column === void 0 ? void 0 : column.cellRenderer : null,
|
|
236
237
|
cellCheckBoxRenderer: cellCheckBoxRenderer,
|
|
237
238
|
} });
|