@knovator/pagecreator-admin 1.5.7 → 1.5.8
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/index.cjs +6 -6
- package/index.js +6 -6
- package/package.json +1 -1
package/index.cjs
CHANGED
|
@@ -7229,17 +7229,17 @@ const WidgetForm = ({
|
|
|
7229
7229
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7230
7230
|
callerRef.current = setTimeout(() => {
|
|
7231
7231
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7232
|
-
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7232
|
+
if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
|
|
7233
7233
|
value: item['_id'] || item['id'],
|
|
7234
7234
|
label: item['name'] || item['title']
|
|
7235
|
-
}
|
|
7235
|
+
})));
|
|
7236
7236
|
if (formState === 'UPDATE') {
|
|
7237
7237
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7238
7238
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7239
|
-
return item ? Object.assign({
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
}
|
|
7239
|
+
return item ? Object.assign(Object.assign({}, item), {
|
|
7240
|
+
value: item._id || item.id,
|
|
7241
|
+
label: item.name || item.title
|
|
7242
|
+
}) : {};
|
|
7243
7243
|
})) || [];
|
|
7244
7244
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7245
7245
|
if (valueToSet) {
|
package/index.js
CHANGED
|
@@ -7217,17 +7217,17 @@ const WidgetForm = ({
|
|
|
7217
7217
|
const collectionToUse = collectionName || (selectedCollectionType === null || selectedCollectionType === void 0 ? void 0 : selectedCollectionType.value);
|
|
7218
7218
|
callerRef.current = setTimeout(() => {
|
|
7219
7219
|
if (collectionToUse) getCollectionData(collectionToUse, str, options => {
|
|
7220
|
-
if (typeof callback === 'function') callback(options.map(item => Object.assign({
|
|
7220
|
+
if (typeof callback === 'function') callback(options.map(item => Object.assign(Object.assign({}, item), {
|
|
7221
7221
|
value: item['_id'] || item['id'],
|
|
7222
7222
|
label: item['name'] || item['title']
|
|
7223
|
-
}
|
|
7223
|
+
})));
|
|
7224
7224
|
if (formState === 'UPDATE') {
|
|
7225
7225
|
let selectedOptions = (collectionItems === null || collectionItems === void 0 ? void 0 : collectionItems.map(itemId => {
|
|
7226
7226
|
item = options.find(item => item._id === itemId || item.id === itemId);
|
|
7227
|
-
return item ? Object.assign({
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
}
|
|
7227
|
+
return item ? Object.assign(Object.assign({}, item), {
|
|
7228
|
+
value: item._id || item.id,
|
|
7229
|
+
label: item.name || item.title
|
|
7230
|
+
}) : {};
|
|
7231
7231
|
})) || [];
|
|
7232
7232
|
selectedOptions = selectedOptions.filter(obj => !!obj.value);
|
|
7233
7233
|
if (valueToSet) {
|