@megha-ui/react 1.3.32 → 1.3.33
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.
|
@@ -362,7 +362,6 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
362
362
|
}
|
|
363
363
|
return text;
|
|
364
364
|
};
|
|
365
|
-
console.log({ options });
|
|
366
365
|
return (_jsxs("div", { style: {
|
|
367
366
|
width: width !== null && width !== void 0 ? width : "max-content",
|
|
368
367
|
marginBottom,
|
|
@@ -480,25 +479,28 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
480
479
|
}, children: [option.icon &&
|
|
481
480
|
option.isDelete &&
|
|
482
481
|
!option.isDelete && _jsx("span", { children: option.icon }), _jsx("span", { style: { margin: "0 0.5rem" }, children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
|
|
483
|
-
}) }))] }, gIndex)))) : (filteredOptions.map((option, index) =>
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
?
|
|
493
|
-
:
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
482
|
+
}) }))] }, gIndex)))) : (filteredOptions.map((option, index) => {
|
|
483
|
+
console.log({ option });
|
|
484
|
+
return (_jsxs("li", { ref: (el) => {
|
|
485
|
+
optionRefs.current[index] = el;
|
|
486
|
+
}, onClick: (e) => onSelectChange
|
|
487
|
+
? handleItemSelect(option, option.disabled || false)
|
|
488
|
+
: handleSelect(option.value, option.disabled || false), style: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center" }), (index === highlightIndex ? listItemHoverStyle : {})), (option.disabled ? listItemDisabledStyle : {})), (index !== highlightIndex &&
|
|
489
|
+
!isMultiple &&
|
|
490
|
+
intermediateValues.includes(option.value)
|
|
491
|
+
? selectedItemStyle
|
|
492
|
+
: {})), { borderBottom: index === filteredOptions.length - 1
|
|
493
|
+
? "none"
|
|
494
|
+
: "1px solid var(--divider-strong, #dddddd)", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
|
|
495
|
+
if (!option.disabled) {
|
|
496
|
+
setHighlightIndex(index);
|
|
497
|
+
}
|
|
498
|
+
}, children: [isMultiple && (_jsx("div", { style: { marginRight: "0.5rem" }, children: _jsx(Checkbox, { selected: intermediateValues.includes(option.value), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) })), _jsxs("div", { style: {
|
|
499
|
+
display: "flex",
|
|
500
|
+
alignItems: "start",
|
|
501
|
+
width: "100%",
|
|
502
|
+
}, children: [option.icon && option.isDelete && !option.isDelete && (_jsx("span", { style: { margin: "0 0.5rem" }, children: option.icon })), _jsx("span", { children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value)));
|
|
503
|
+
})) }), onApplyChange && (_jsx("li", { style: {
|
|
502
504
|
display: "flex",
|
|
503
505
|
alignItems: "center",
|
|
504
506
|
justifyContent: "end",
|
package/package.json
CHANGED