@megha-ui/react 1.2.226 → 1.2.227
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
|
+
console.log(prevOptions);
|
|
364
367
|
const refIndex = gIndex > 0
|
|
365
|
-
?
|
|
368
|
+
? prevOptions.length + index
|
|
366
369
|
: index;
|
|
367
370
|
return (_jsxs("li", { ref: (el) => {
|
|
368
371
|
optionRefs.current[refIndex] = el;
|
package/package.json
CHANGED