@megha-ui/react 1.2.94 → 1.2.96
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.
|
@@ -319,17 +319,17 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
319
319
|
borderRadius: 4,
|
|
320
320
|
} }) })), isSelectAll && isMultiple && filteredOptions.length > 0 && ((0, jsx_runtime_1.jsxs)("li", { style: Object.assign(Object.assign(Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center" }), (-1 === highlightIndex ? listItemHoverStyle : {})), { borderBottom: "1px solid #dddddd", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), onMouseEnter: (e) => {
|
|
321
321
|
setHighlightIndex(-1);
|
|
322
|
-
}, onClick: () => onSelectChange ? handleAllItemSelect() : handleAllSelect(), children: [(0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues
|
|
323
|
-
.sort((a, b) => (a > b ? -1 : 1))
|
|
324
|
-
.toString() ===
|
|
325
|
-
filteredOptions
|
|
326
|
-
.map((item) => item.value)
|
|
322
|
+
}, onClick: () => onSelectChange ? handleAllItemSelect() : handleAllSelect(), children: [(0, jsx_runtime_1.jsx)("div", { style: { marginRight: "0.5rem" }, children: (0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues
|
|
327
323
|
.sort((a, b) => (a > b ? -1 : 1))
|
|
328
|
-
.toString()
|
|
324
|
+
.toString() ===
|
|
325
|
+
filteredOptions
|
|
326
|
+
.map((item) => item.value)
|
|
327
|
+
.sort((a, b) => (a > b ? -1 : 1))
|
|
328
|
+
.toString(), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
329
329
|
display: "flex",
|
|
330
330
|
alignItems: "start",
|
|
331
331
|
width: "100%",
|
|
332
|
-
}, children: (0, jsx_runtime_1.jsx)("span", {
|
|
332
|
+
}, children: (0, jsx_runtime_1.jsx)("span", { children: "Select All" }) })] })), (0, jsx_runtime_1.jsx)("div", { style: { maxHeight: maxDropdownHeight, overflowY: "auto" }, children: isLoading ? ((0, jsx_runtime_1.jsxs)(block_1.default, { as: "div", className: "flex items-center justify-between", children: [(0, jsx_runtime_1.jsx)(text_1.default, { as: "span", children: "Loading options" }), (0, jsx_runtime_1.jsx)(loader_1.default, { size: 12 })] })) : isCreatable && filteredOptions.length < 1 ? ((0, jsx_runtime_1.jsxs)("li", { onClick: (e) => onCreate(searchTerm), style: Object.assign(Object.assign({}, listItemStyle), { display: "flex", alignItems: "center", wordWrap: "break-word", textWrap: "wrap", justifyContent: "space-between" }), children: [isMultiple && ((0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues.includes(searchTerm), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper })), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
333
333
|
display: "flex",
|
|
334
334
|
alignItems: "start",
|
|
335
335
|
width: "100%",
|
|
@@ -347,11 +347,11 @@ const Dropdown = ({ options, selectedValues, onChange, placeholder = "Select..."
|
|
|
347
347
|
if (!option.disabled) {
|
|
348
348
|
setHighlightIndex(index);
|
|
349
349
|
}
|
|
350
|
-
}, children: [isMultiple && ((0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues.includes(option.value), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
350
|
+
}, children: [isMultiple && ((0, jsx_runtime_1.jsx)("div", { style: { marginLeft: "0.5rem" }, children: (0, jsx_runtime_1.jsx)(checkbox_1.default, { selected: intermediateValues.includes(option.value), onChange: () => { }, style: { pointerEvents: "none" }, noLabel: true, wrapperClass: checkboxWrapper }) })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
351
351
|
display: "flex",
|
|
352
352
|
alignItems: "start",
|
|
353
353
|
width: "100%",
|
|
354
|
-
}, children: [option.icon && option.isDelete && !option.isDelete && ((0, jsx_runtime_1.jsx)("span", { style: {
|
|
354
|
+
}, children: [option.icon && option.isDelete && !option.isDelete && ((0, jsx_runtime_1.jsx)("span", { style: { margin: "0 0.5rem" }, children: option.icon })), (0, jsx_runtime_1.jsx)("span", { children: option.label })] }), option.icon && option.isDelete && option.icon] }, String(option.value))))) }), onApplyChange && ((0, jsx_runtime_1.jsx)("li", { style: {
|
|
355
355
|
display: "flex",
|
|
356
356
|
alignItems: "center",
|
|
357
357
|
justifyContent: "end",
|
package/package.json
CHANGED