arengibook 2.4.617 → 2.4.619
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 +29 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39131,30 +39131,35 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39131
39131
|
setLoading = _useState8[1];
|
|
39132
39132
|
var loadLazyTimeout = useRef();
|
|
39133
39133
|
var currentPageRef = useRef(1);
|
|
39134
|
+
var isOptionsArray = Array.isArray(options);
|
|
39134
39135
|
useEffect(function () {
|
|
39135
|
-
|
|
39136
|
-
|
|
39137
|
-
|
|
39138
|
-
|
|
39139
|
-
|
|
39140
|
-
|
|
39141
|
-
|
|
39142
|
-
|
|
39143
|
-
|
|
39144
|
-
|
|
39145
|
-
|
|
39146
|
-
|
|
39147
|
-
|
|
39148
|
-
|
|
39149
|
-
|
|
39150
|
-
|
|
39151
|
-
|
|
39152
|
-
|
|
39153
|
-
|
|
39154
|
-
|
|
39155
|
-
|
|
39156
|
-
|
|
39157
|
-
|
|
39136
|
+
if (isOptionsArray) {
|
|
39137
|
+
setLoadedOptions(options);
|
|
39138
|
+
} else {
|
|
39139
|
+
var loadInitialOptions = /*#__PURE__*/function () {
|
|
39140
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
39141
|
+
var result;
|
|
39142
|
+
return _regenerator().w(function (_context) {
|
|
39143
|
+
while (1) switch (_context.n) {
|
|
39144
|
+
case 0:
|
|
39145
|
+
_context.n = 1;
|
|
39146
|
+
return options('', [], {
|
|
39147
|
+
page: 1
|
|
39148
|
+
});
|
|
39149
|
+
case 1:
|
|
39150
|
+
result = _context.v;
|
|
39151
|
+
setLoadedOptions((result === null || result === void 0 ? void 0 : result.options) || []);
|
|
39152
|
+
case 2:
|
|
39153
|
+
return _context.a(2);
|
|
39154
|
+
}
|
|
39155
|
+
}, _callee);
|
|
39156
|
+
}));
|
|
39157
|
+
return function loadInitialOptions() {
|
|
39158
|
+
return _ref2.apply(this, arguments);
|
|
39159
|
+
};
|
|
39160
|
+
}();
|
|
39161
|
+
loadInitialOptions();
|
|
39162
|
+
}
|
|
39158
39163
|
}, [options]);
|
|
39159
39164
|
|
|
39160
39165
|
// Gestion du changement de sélection
|
|
@@ -39238,6 +39243,7 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39238
39243
|
|
|
39239
39244
|
// Fonction de lazy loading
|
|
39240
39245
|
var onLazyLoad = function onLazyLoad(event) {
|
|
39246
|
+
if (isOptionsArray) return;
|
|
39241
39247
|
setLoading(true);
|
|
39242
39248
|
if (loadLazyTimeout.current) {
|
|
39243
39249
|
clearTimeout(loadLazyTimeout.current);
|