@arquimedes.co/eureka-forms 2.0.7-test → 2.0.8-test
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.
|
@@ -87,7 +87,7 @@ export function SmartSelect(_a) {
|
|
|
87
87
|
var isEmpty = useAppSelector(function (state) { var _a; return (_a = state.site.dependencies[step.id]) === null || _a === void 0 ? void 0 : _a.empty; });
|
|
88
88
|
var disabled = emptyDep;
|
|
89
89
|
useEffect(function () {
|
|
90
|
-
if (!postview) {
|
|
90
|
+
if (!postview && editable) {
|
|
91
91
|
calcOptions(firstTime);
|
|
92
92
|
if (firstTime)
|
|
93
93
|
setFirstTime(false);
|
|
@@ -116,9 +116,10 @@ export function SmartSelect(_a) {
|
|
|
116
116
|
newValue = resp.find(function (option) {
|
|
117
117
|
return getValueString(option) === getValueString(value);
|
|
118
118
|
});
|
|
119
|
-
|
|
119
|
+
if (!firstTime || newValue)
|
|
120
|
+
onChange(newValue);
|
|
120
121
|
}
|
|
121
|
-
else
|
|
122
|
+
else if (!firstTime)
|
|
122
123
|
onChange(null);
|
|
123
124
|
}
|
|
124
125
|
setOptions(resp);
|
package/package.json
CHANGED