@portnet/ui 0.0.77 → 0.0.80
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.
|
@@ -193,7 +193,7 @@ const PuiFormikAutocomplete = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
193
193
|
setHasError(Boolean(meta) && Boolean(meta.touched) && Boolean(meta.error));
|
|
194
194
|
}, [meta]);
|
|
195
195
|
React.useEffect(() => {
|
|
196
|
-
if (!Boolean(selectedOption) && value !== undefined && options !== undefined) {
|
|
196
|
+
if ((!Boolean(selectedOption) || getOptionValue(selectedOption) !== value) && value !== undefined && options !== undefined) {
|
|
197
197
|
let option;
|
|
198
198
|
if (typeof value === "object") {
|
|
199
199
|
option = value;
|
|
@@ -212,8 +212,7 @@ const PuiFormikAutocomplete = /*#__PURE__*/React.forwardRef((_ref3, ref) => {
|
|
|
212
212
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
213
213
|
}, [field.value]);
|
|
214
214
|
React.useEffect(() => {
|
|
215
|
-
|
|
216
|
-
if (!Boolean(selectedOption) && field.value !== undefined && options !== undefined) {
|
|
215
|
+
if ((!Boolean(selectedOption) || getOptionValue(selectedOption) !== field.value) && field.value !== undefined && options !== undefined) {
|
|
217
216
|
let option;
|
|
218
217
|
if (typeof field.value === "object") {
|
|
219
218
|
option = field.value;
|