baaz-custom-components 3.2.2 → 3.2.3
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.js +9 -4
- package/dist/index.mjs +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -429,9 +429,10 @@ function ScrollBar(_a) {
|
|
|
429
429
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
430
430
|
function SrpDropDown({
|
|
431
431
|
hubIds,
|
|
432
|
-
onChange
|
|
432
|
+
onChange,
|
|
433
|
+
userData
|
|
433
434
|
}) {
|
|
434
|
-
const defaultValue =
|
|
435
|
+
const defaultValue = userData.currentHubId.toString();
|
|
435
436
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Select, { onValueChange: onChange, defaultValue, children: [
|
|
436
437
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectTrigger, { className: "w-[100px] cursor-pointer", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectValue, { placeholder: "Hub Id" }) }),
|
|
437
438
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectContent, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollArea, { className: "h-40 w-full", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectGroup, { className: "cursor-pointer", children: hubIds == null ? void 0 : hubIds.map((hubId, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { children: [
|
|
@@ -462,7 +463,7 @@ var User = ({
|
|
|
462
463
|
role: "User",
|
|
463
464
|
email: "No email provided",
|
|
464
465
|
phone: "No phone provided",
|
|
465
|
-
currentHubId:
|
|
466
|
+
currentHubId: 8
|
|
466
467
|
};
|
|
467
468
|
const [selectedHubId, setSelectedHubId] = (0, import_react.useState)(
|
|
468
469
|
safeUserData.currentHubId
|
|
@@ -522,7 +523,11 @@ var User = ({
|
|
|
522
523
|
SrpDropDown,
|
|
523
524
|
{
|
|
524
525
|
hubIds,
|
|
525
|
-
|
|
526
|
+
userData: safeUserData,
|
|
527
|
+
onChange: (value) => {
|
|
528
|
+
handleChange(value);
|
|
529
|
+
if (hubIdChangeHandler) hubIdChangeHandler(value);
|
|
530
|
+
}
|
|
526
531
|
}
|
|
527
532
|
)
|
|
528
533
|
] }),
|
package/dist/index.mjs
CHANGED
|
@@ -395,9 +395,10 @@ function ScrollBar(_a) {
|
|
|
395
395
|
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
396
396
|
function SrpDropDown({
|
|
397
397
|
hubIds,
|
|
398
|
-
onChange
|
|
398
|
+
onChange,
|
|
399
|
+
userData
|
|
399
400
|
}) {
|
|
400
|
-
const defaultValue =
|
|
401
|
+
const defaultValue = userData.currentHubId.toString();
|
|
401
402
|
return /* @__PURE__ */ jsxs4(Select, { onValueChange: onChange, defaultValue, children: [
|
|
402
403
|
/* @__PURE__ */ jsx6(SelectTrigger, { className: "w-[100px] cursor-pointer", children: /* @__PURE__ */ jsx6(SelectValue, { placeholder: "Hub Id" }) }),
|
|
403
404
|
/* @__PURE__ */ jsx6(SelectContent, { children: /* @__PURE__ */ jsx6(ScrollArea, { className: "h-40 w-full", children: /* @__PURE__ */ jsx6(SelectGroup, { className: "cursor-pointer", children: hubIds == null ? void 0 : hubIds.map((hubId, index) => /* @__PURE__ */ jsxs4("div", { children: [
|
|
@@ -428,7 +429,7 @@ var User = ({
|
|
|
428
429
|
role: "User",
|
|
429
430
|
email: "No email provided",
|
|
430
431
|
phone: "No phone provided",
|
|
431
|
-
currentHubId:
|
|
432
|
+
currentHubId: 8
|
|
432
433
|
};
|
|
433
434
|
const [selectedHubId, setSelectedHubId] = useState2(
|
|
434
435
|
safeUserData.currentHubId
|
|
@@ -488,7 +489,11 @@ var User = ({
|
|
|
488
489
|
SrpDropDown,
|
|
489
490
|
{
|
|
490
491
|
hubIds,
|
|
491
|
-
|
|
492
|
+
userData: safeUserData,
|
|
493
|
+
onChange: (value) => {
|
|
494
|
+
handleChange(value);
|
|
495
|
+
if (hubIdChangeHandler) hubIdChangeHandler(value);
|
|
496
|
+
}
|
|
492
497
|
}
|
|
493
498
|
)
|
|
494
499
|
] }),
|