@bluemarble/bm-components 1.10.3 → 1.10.4
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3413,14 +3413,14 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3413
3413
|
const [_a2, ..._b2] = _formik.useField.call(void 0, {
|
|
3414
3414
|
name: props.name
|
|
3415
3415
|
}), _c = _a2, { value } = _c, field = __objRest(_c, ["value"]), [meta, { setValue }] = _b2;
|
|
3416
|
-
const defaultOption = _react.
|
|
3416
|
+
const [defaultOption] = _react.useState.call(void 0, () => {
|
|
3417
3417
|
const key = option == null ? void 0 : option.key;
|
|
3418
3418
|
if (key)
|
|
3419
3419
|
return props.options.find((option2) => option2[key] === value);
|
|
3420
3420
|
return props.options.find(
|
|
3421
3421
|
(option2) => Object.values(option2)[0] === value
|
|
3422
3422
|
);
|
|
3423
|
-
}
|
|
3423
|
+
});
|
|
3424
3424
|
const onChange = (_, newValue) => {
|
|
3425
3425
|
const value2 = option == null ? void 0 : option.value;
|
|
3426
3426
|
if (getOptionValue) {
|
|
@@ -3463,7 +3463,7 @@ function FormikAutocompleteLegacy(_a) {
|
|
|
3463
3463
|
autoFocus: props.autoFocus
|
|
3464
3464
|
}), props.textFieldProps)
|
|
3465
3465
|
),
|
|
3466
|
-
|
|
3466
|
+
defaultValue: defaultOption || null,
|
|
3467
3467
|
onChange,
|
|
3468
3468
|
isOptionEqualToValue
|
|
3469
3469
|
}, props)
|