nexaas-ui-components 1.0.57 → 1.0.58
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.cjs +25 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +26 -16
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -3431,11 +3431,13 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3431
3431
|
onChange(fetchedOptions[0]);
|
|
3432
3432
|
setTimeout(() => {
|
|
3433
3433
|
var _a3, _b, _c;
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3434
|
+
if (clearAfterSelect) {
|
|
3435
|
+
setInputValue("");
|
|
3436
|
+
(_a3 = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _a3.clearValue();
|
|
3437
|
+
(_b = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _b.focus();
|
|
3438
|
+
(_c = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _c.onMenuClose();
|
|
3439
|
+
field.onChange(null);
|
|
3440
|
+
}
|
|
3439
3441
|
}, 10);
|
|
3440
3442
|
} else {
|
|
3441
3443
|
onErrorBip((_a2 = event == null ? void 0 : event.target) == null ? void 0 : _a2.value);
|
|
@@ -3446,7 +3448,7 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3446
3448
|
};
|
|
3447
3449
|
const handleInputChange = (value, actionMeta) => {
|
|
3448
3450
|
if (actionMeta.action === "input-change") {
|
|
3449
|
-
setInputValue(value);
|
|
3451
|
+
if (clearAfterSelect) setInputValue(value);
|
|
3450
3452
|
}
|
|
3451
3453
|
return value;
|
|
3452
3454
|
};
|
|
@@ -3462,15 +3464,19 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3462
3464
|
field.onChange(null);
|
|
3463
3465
|
} else {
|
|
3464
3466
|
field.onChange(value);
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
+
if (clearAfterSelect) {
|
|
3468
|
+
setInputValue("");
|
|
3469
|
+
(_d = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _d.onMenuClose();
|
|
3470
|
+
}
|
|
3467
3471
|
}
|
|
3468
3472
|
}
|
|
3469
3473
|
if (action === "clear-value") {
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
+
if (clearAfterSelect) {
|
|
3475
|
+
setInputValue("");
|
|
3476
|
+
setCachedOptions([]);
|
|
3477
|
+
(_e = selectRef == null ? void 0 : selectRef.current) == null ? void 0 : _e.clearValue();
|
|
3478
|
+
field.onChange(null);
|
|
3479
|
+
}
|
|
3474
3480
|
}
|
|
3475
3481
|
};
|
|
3476
3482
|
const loadOptions = (value, callback) => {
|
|
@@ -3488,9 +3494,13 @@ var SelectFieldBip = React5.forwardRef(
|
|
|
3488
3494
|
...hasIcon,
|
|
3489
3495
|
ref: selectRef,
|
|
3490
3496
|
isDisabled: disabled,
|
|
3491
|
-
onBlur: () =>
|
|
3492
|
-
|
|
3493
|
-
|
|
3497
|
+
onBlur: () => {
|
|
3498
|
+
if (clearAfterSelect) {
|
|
3499
|
+
handleInputChange("", {
|
|
3500
|
+
action: "input-change"
|
|
3501
|
+
});
|
|
3502
|
+
}
|
|
3503
|
+
},
|
|
3494
3504
|
loadingMessage: () => /* @__PURE__ */ jsxRuntime.jsx("div", { children: messages.loading }),
|
|
3495
3505
|
isLoading: loading,
|
|
3496
3506
|
loadOptions,
|