@kashifd/jwero-components 0.6.20 → 0.6.22
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.
- package/dist/index.es.js +13 -5
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -46504,17 +46504,25 @@ const Ia = ({ stroke: e = "#000", ...t }) => /* @__PURE__ */ w.jsxs(
|
|
|
46504
46504
|
c === "autocomplete" && /* @__PURE__ */ w.jsx(
|
|
46505
46505
|
fd,
|
|
46506
46506
|
{
|
|
46507
|
-
multiple: !0,
|
|
46508
|
-
freeSolo: !
|
|
46507
|
+
multiple: (R == null ? void 0 : R.multiple) ?? !0,
|
|
46508
|
+
freeSolo: (R == null ? void 0 : R.freeSolo) ?? !1,
|
|
46509
46509
|
options: r,
|
|
46510
46510
|
disableCloseOnSelect: !0,
|
|
46511
46511
|
getOptionLabel: (G) => G == null ? void 0 : G.label,
|
|
46512
|
-
value: I || [],
|
|
46512
|
+
value: R != null && R.freeSolo ? I[0] : I || [],
|
|
46513
46513
|
size: "small",
|
|
46514
46514
|
sx: { mt: e ? "0.5rem" : 0 },
|
|
46515
46515
|
onChange: (G, Y) => {
|
|
46516
|
-
|
|
46517
|
-
|
|
46516
|
+
if (R != null && R.freeSolo)
|
|
46517
|
+
if ((R == null ? void 0 : R.multiple) ?? !0) {
|
|
46518
|
+
const te = Y.map(
|
|
46519
|
+
(ue) => typeof ue == "string" ? { label: ue, value: ue } : ue
|
|
46520
|
+
);
|
|
46521
|
+
t(te);
|
|
46522
|
+
} else
|
|
46523
|
+
t(typeof Y == "string" ? { label: Y, value: Y } : Y);
|
|
46524
|
+
else
|
|
46525
|
+
t(Y);
|
|
46518
46526
|
},
|
|
46519
46527
|
isOptionEqualToValue: (G, Y) => G.value === Y.value,
|
|
46520
46528
|
renderOption: (G, Y, { selected: te }) => /* @__PURE__ */ w.jsx("li", { ...G, children: /* @__PURE__ */ w.jsx(pt, { children: Y.label }) }),
|