sccoreui 6.2.47 → 6.2.48
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.
|
@@ -12,17 +12,14 @@ function Search({ searchPlaceHolder }) {
|
|
|
12
12
|
const { featureDetails, setFeatureDetails, rowModelType, gridApi, quickSearch, } = (0, react_1.useContext)(context_provider_1.FeatureContext);
|
|
13
13
|
const [inputValue, deboucedValue, setInputValue] = (0, hooks_1.useDebounce)("", 500);
|
|
14
14
|
(0, react_1.useEffect)(() => {
|
|
15
|
-
var _a, _b
|
|
15
|
+
var _a, _b;
|
|
16
16
|
if (rowModelType === constants_1.ROWMODELTYPE.CLIENT_SIDE && quickSearch) {
|
|
17
17
|
if (gridApi === null || gridApi === void 0 ? void 0 : gridApi.current) {
|
|
18
18
|
(_a = gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api) === null || _a === void 0 ? void 0 : _a.setGridOption("quickFilterText", deboucedValue);
|
|
19
19
|
const displayedRowCount = (_b = gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api) === null || _b === void 0 ? void 0 : _b.getDisplayedRowCount();
|
|
20
|
-
if (displayedRowCount === 0
|
|
20
|
+
if (displayedRowCount === 0) {
|
|
21
21
|
gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api.showNoRowsOverlay();
|
|
22
22
|
}
|
|
23
|
-
else if (displayedRowCount > 0) {
|
|
24
|
-
(_c = gridApi === null || gridApi === void 0 ? void 0 : gridApi.current.api) === null || _c === void 0 ? void 0 : _c.hideOverlay();
|
|
25
|
-
}
|
|
26
23
|
}
|
|
27
24
|
}
|
|
28
25
|
else {
|
|
@@ -22,7 +22,7 @@ function ParentForGrid(props) {
|
|
|
22
22
|
let maxLength = 0;
|
|
23
23
|
// const [style] = useState<Style>(props.style);
|
|
24
24
|
const [api, setApi] = (0, react_1.useState)(null);
|
|
25
|
-
const [totalRecords, setTotalRecords] = (0, react_1.useState)(
|
|
25
|
+
const [totalRecords, setTotalRecords] = (0, react_1.useState)(0);
|
|
26
26
|
const [gridReadyEvent, setGridReadyEvent] = (0, react_1.useState)();
|
|
27
27
|
const [intialColumns, setIntialColumns] = (0, react_1.useState)(null);
|
|
28
28
|
const [defaultFilters, setDefaultFilters] = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.defaultFilters) || []);
|
|
@@ -297,10 +297,7 @@ function ParentForGrid(props) {
|
|
|
297
297
|
const deepCopyOfColumns = (0, helper_1.deepClone)(gridData === null || gridData === void 0 ? void 0 : gridData.columnData);
|
|
298
298
|
setIntialColumns(deepCopyOfColumns);
|
|
299
299
|
}
|
|
300
|
-
|
|
301
|
-
setTotalRecords(props === null || props === void 0 ? void 0 : props.rowData.length);
|
|
302
|
-
}
|
|
303
|
-
}, [intialColumns, props === null || props === void 0 ? void 0 : props.rowData]);
|
|
300
|
+
}, [intialColumns]);
|
|
304
301
|
(0, react_1.useEffect)(() => {
|
|
305
302
|
if (props === null || props === void 0 ? void 0 : props.getGridRef) {
|
|
306
303
|
props.getGridRef.current = gridRef.current;
|