sccoreui 6.2.35 → 6.2.37
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.
|
@@ -303,6 +303,22 @@ function ParentForGrid(props) {
|
|
|
303
303
|
}
|
|
304
304
|
}, [props === null || props === void 0 ? void 0 : props.getGridRef]);
|
|
305
305
|
const gridStyle = Object.assign({ width: (_c = props === null || props === void 0 ? void 0 : props.style) === null || _c === void 0 ? void 0 : _c.width }, ((totalRecords > 6 || !((_d = props === null || props === void 0 ? void 0 : props.conditionsToDisplay) === null || _d === void 0 ? void 0 : _d.isGridAutoHeight)) ? { height: (_e = props === null || props === void 0 ? void 0 : props.style) === null || _e === void 0 ? void 0 : _e.height } : null));
|
|
306
|
+
// Dont show hide overlay component when any row pinned
|
|
307
|
+
(0, react_1.useEffect)(() => {
|
|
308
|
+
var _a;
|
|
309
|
+
if (!(props === null || props === void 0 ? void 0 : props.pinnedTopRowData))
|
|
310
|
+
return;
|
|
311
|
+
const api = (_a = gridRef === null || gridRef === void 0 ? void 0 : gridRef.current) === null || _a === void 0 ? void 0 : _a.api;
|
|
312
|
+
// Check for pinned rows and regular row data
|
|
313
|
+
const hasPinnedRows = (api === null || api === void 0 ? void 0 : api.getPinnedTopRowCount()) > 0 || (api === null || api === void 0 ? void 0 : api.getPinnedBottomRowCount()) > 0;
|
|
314
|
+
const hasRowData = (api === null || api === void 0 ? void 0 : api.getDisplayedRowCount()) > 0;
|
|
315
|
+
if (hasPinnedRows || hasRowData) {
|
|
316
|
+
api.hideOverlay(); // Hide the noRowsOverlayComponent if pinned rows or row data exists
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
api === null || api === void 0 ? void 0 : api.showNoRowsOverlay(); // Show the noRowsOverlayComponent only if no rows or pinned rows are present
|
|
320
|
+
}
|
|
321
|
+
}, [gridData.rowData, props === null || props === void 0 ? void 0 : props.pinnedTopRowData]);
|
|
306
322
|
// Options that grid should have
|
|
307
323
|
const gridOptions = Object.assign({ columnDefs: (_f = gridData === null || gridData === void 0 ? void 0 : gridData.columnData) === null || _f === void 0 ? void 0 : _f.map((column) => {
|
|
308
324
|
var _a, _b;
|