iglooform 2.5.5 → 2.5.6
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/es/utils/option-utils.js
CHANGED
|
@@ -108,6 +108,10 @@ export function optionsHOC(Component) {
|
|
|
108
108
|
}, [optionsFromGetOptions]);
|
|
109
109
|
invariant(datasourceKey && selectDatasourceApi || !datasourceKey, 'Please provide selectDatasourceApi in Form props');
|
|
110
110
|
useEffect(function () {
|
|
111
|
+
if (Array.isArray(optionsFromGetOptions)) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
|
|
111
115
|
setUpdating(true);
|
|
112
116
|
|
|
113
117
|
var calcOptions = /*#__PURE__*/function () {
|
|
@@ -222,7 +226,7 @@ export function optionsHOC(Component) {
|
|
|
222
226
|
|
|
223
227
|
setUpdating(false);
|
|
224
228
|
});
|
|
225
|
-
}, [options, optionGroups, dependFieldValue, searchKey]);
|
|
229
|
+
}, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey]);
|
|
226
230
|
return _options ? _jsx(Component, _objectSpread(_objectSpread({
|
|
227
231
|
options: _options
|
|
228
232
|
}, rest), {}, {
|
|
@@ -125,6 +125,10 @@ function optionsHOC(Component) {
|
|
|
125
125
|
}, [optionsFromGetOptions]);
|
|
126
126
|
(0, _invariant.default)(datasourceKey && selectDatasourceApi || !datasourceKey, 'Please provide selectDatasourceApi in Form props');
|
|
127
127
|
(0, _react.useEffect)(function () {
|
|
128
|
+
if (Array.isArray(optionsFromGetOptions)) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
128
132
|
setUpdating(true);
|
|
129
133
|
|
|
130
134
|
var calcOptions = /*#__PURE__*/function () {
|
|
@@ -239,7 +243,7 @@ function optionsHOC(Component) {
|
|
|
239
243
|
|
|
240
244
|
setUpdating(false);
|
|
241
245
|
});
|
|
242
|
-
}, [options, optionGroups, dependFieldValue, searchKey]);
|
|
246
|
+
}, [options, optionsFromGetOptions, optionGroups, dependFieldValue, searchKey]);
|
|
243
247
|
return _options ? (0, _jsxRuntime.jsx)(Component, _objectSpread(_objectSpread({
|
|
244
248
|
options: _options
|
|
245
249
|
}, rest), {}, {
|