sccoreui 6.2.46 → 6.2.47

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,14 +12,17 @@ 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, _c;
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 && Boolean(deboucedValue)) {
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
+ }
23
26
  }
24
27
  }
25
28
  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)(0);
25
+ const [totalRecords, setTotalRecords] = (0, react_1.useState)((props === null || props === void 0 ? void 0 : props.rowData) ? props === null || props === void 0 ? void 0 : props.rowData.length : 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,7 +297,10 @@ 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
- }, [intialColumns]);
300
+ if (props === null || props === void 0 ? void 0 : props.rowData) {
301
+ setTotalRecords(props === null || props === void 0 ? void 0 : props.rowData.length);
302
+ }
303
+ }, [intialColumns, props === null || props === void 0 ? void 0 : props.rowData]);
301
304
  (0, react_1.useEffect)(() => {
302
305
  if (props === null || props === void 0 ? void 0 : props.getGridRef) {
303
306
  props.getGridRef.current = gridRef.current;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sccoreui",
3
- "version": "6.2.46",
3
+ "version": "6.2.47",
4
4
  "description": "ui-sccore",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",