@megha-ui/react 1.2.237 → 1.2.238
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.
|
@@ -230,7 +230,11 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
230
230
|
const handleClear = () => {
|
|
231
231
|
if (!isClear)
|
|
232
232
|
return;
|
|
233
|
-
onApplyChange
|
|
233
|
+
onApplyChange
|
|
234
|
+
? onApplyChange([])
|
|
235
|
+
: onSelectChange
|
|
236
|
+
? onSelectChange([])
|
|
237
|
+
: onChange([]);
|
|
234
238
|
};
|
|
235
239
|
useEffect(() => {
|
|
236
240
|
if (!isMultiple && intermediateValues.length > 0) {
|
|
@@ -362,7 +366,7 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
362
366
|
width: "100%",
|
|
363
367
|
}, children: _jsxs("span", { style: { marginLeft: "0.5rem" }, children: ["+ Create ", searchTerm] }) })] }, String(searchTerm))) : groupedOptions.length > 0 ? (groupedOptions.map((groupOption, gIndex) => (_jsxs("div", { children: [_jsx("div", { style: {
|
|
364
368
|
padding: "0.25rem 0 0.25rem 1rem",
|
|
365
|
-
backgroundColor: "#dddddd"
|
|
369
|
+
backgroundColor: "#dddddd",
|
|
366
370
|
}, children: groupOption.groupedValue }), groupOption.options.map((option, index) => {
|
|
367
371
|
let prevOptions = groupedOptions.filter((item, index) => index < gIndex);
|
|
368
372
|
prevOptions = [
|
package/package.json
CHANGED