@megha-ui/react 1.2.436 → 1.2.437

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.
@@ -37,6 +37,7 @@ type IconDropdownProps = {
37
37
  ultraCompactDisplay?: boolean;
38
38
  onChange: (values: (number | string)[]) => void;
39
39
  onMenuClose?: (e: MouseEvent) => void;
40
+ onMenuOpen?: (e: MouseEvent) => void;
40
41
  options: DropdownOption[];
41
42
  placeholder?: string;
42
43
  required?: boolean;
@@ -5,7 +5,7 @@ import { HiChevronDown } from "react-icons/hi";
5
5
  import Block from "../block";
6
6
  import Loader from "../loader";
7
7
  import Text from "../text";
8
- const IconDropdown = ({ className, ClearIcon, clearId, closeOnSelect = true, disabled = false, DropDownIcon, dropdownListBG, dropdownListWidth, isClear, maxDropdownHeight = "200px", menuFrom = "left", onChange, onMenuClose, options, searchBorderColor = "#2377ba", searchEnabled = true, selectedDisplay, selectedValues, style, Tooltip, withTooltip = false, withValue, labelFontSize, labelFontWeight, labelMarginBottom, asteriskColor, autoPosition = false, compactDisplay = false, ultraCompactDisplay = false, isSort = true, marginTop, marginRight, marginBottom, marginLeft, width, label, required, border, isLoading = false, isGrouping = false, }) => {
8
+ const IconDropdown = ({ className, ClearIcon, clearId, closeOnSelect = true, disabled = false, DropDownIcon, dropdownListBG, dropdownListWidth, isClear, maxDropdownHeight = "200px", menuFrom = "left", onChange, onMenuClose, onMenuOpen, options, searchBorderColor = "#2377ba", searchEnabled = true, selectedDisplay, selectedValues, style, Tooltip, withTooltip = false, withValue, labelFontSize, labelFontWeight, labelMarginBottom, asteriskColor, autoPosition = false, compactDisplay = false, ultraCompactDisplay = false, isSort = true, marginTop, marginRight, marginBottom, marginLeft, width, label, required, border, isLoading = false, isGrouping = false, }) => {
9
9
  var _a, _b;
10
10
  const { density } = useDensity();
11
11
  const [isOpen, setIsOpen] = useState(false);
@@ -217,6 +217,7 @@ const IconDropdown = ({ className, ClearIcon, clearId, closeOnSelect = true, dis
217
217
  calculateAutoPosition();
218
218
  }
219
219
  setIsOpen(!isOpen);
220
+ onMenuOpen && onMenuOpen(e);
220
221
  }
221
222
  };
222
223
  const wrapMiddle = (text, maxLength, wrapper = "...") => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.436",
3
+ "version": "1.2.437",
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",