@megha-ui/react 1.2.791 → 1.2.792

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.
@@ -44,6 +44,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
44
44
  const parentRect = parent.getBoundingClientRect();
45
45
  const elementRect = element.getBoundingClientRect();
46
46
  const searchOptionRect = (_a = searchOptionRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
47
+ console.log(searchOptionRect);
47
48
  return parentRect.height - elementRect.height - 4 - ((_b = searchOptionRect === null || searchOptionRect === void 0 ? void 0 : searchOptionRect.height) !== null && _b !== void 0 ? _b : 0);
48
49
  }
49
50
  console.log({ parent });
@@ -323,10 +324,12 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
323
324
  };
324
325
  const handleClick = (e) => {
325
326
  const clearEle = document.getElementById(clearId || "");
326
- const rect = e.currentTarget.getBoundingClientRect();
327
- const viewportSpace = document.body.clientHeight - rect.bottom;
328
- const overflowSpace = getOverflowParentHeight(wrapperRef.current, viewportSpace);
329
- setHeight(overflowSpace);
327
+ setTimeout(() => {
328
+ const rect = e.currentTarget.getBoundingClientRect();
329
+ const viewportSpace = document.body.clientHeight - rect.bottom;
330
+ const overflowSpace = getOverflowParentHeight(wrapperRef.current, viewportSpace);
331
+ setHeight(overflowSpace);
332
+ }, 500);
330
333
  if (clearEle === e.target) {
331
334
  e.preventDefault();
332
335
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.791",
3
+ "version": "1.2.792",
4
4
  "description": "A collection of reusable UI components for React applications, built with TypeScript.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",