@megha-ui/react 1.2.226 → 1.2.228

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.
@@ -361,8 +361,11 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
361
361
  alignItems: "start",
362
362
  width: "100%",
363
363
  }, children: _jsxs("span", { style: { marginLeft: "0.5rem" }, children: ["+ Create ", searchTerm] }) })] }, String(searchTerm))) : groupedOptions.length > 0 ? (groupedOptions.map((groupOption, gIndex) => (_jsxs("div", { children: [_jsx("div", { children: groupOption.groupedValue }), groupOption.options.map((option, index) => {
364
+ let prevOptions = groupedOptions.filter((item, index) => index < gIndex);
365
+ prevOptions = [...prevOptions.map((item) => item.options)];
366
+ prevOptions = prevOptions.flatMap((item) => item);
364
367
  const refIndex = gIndex > 0
365
- ? groupedOptions[gIndex - 1].options.length + index
368
+ ? prevOptions.length + index
366
369
  : index;
367
370
  return (_jsxs("li", { ref: (el) => {
368
371
  optionRefs.current[refIndex] = el;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megha-ui/react",
3
- "version": "1.2.226",
3
+ "version": "1.2.228",
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",