@micromag/media-gallery 0.3.531 → 0.3.533

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/index.js CHANGED
@@ -180,8 +180,9 @@ var defaultFields = [{
180
180
  component: 'select',
181
181
  requestUrl: '/api/medias/tags',
182
182
  optionLabelPath: 'name',
183
- optionValuePath: 'name',
184
- // Uses taggable
183
+ optionValuePath: 'id',
184
+ // Uses taggable so change the logic here
185
+ valueIsOption: true,
185
186
  multiple: true,
186
187
  paginated: false
187
188
  }]
@@ -548,8 +549,16 @@ function MediaGallery(_ref) {
548
549
  options: (options || []).map(function () {
549
550
  var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
550
551
  _ref4$value = _ref4.value,
551
- optionValue = _ref4$value === void 0 ? null : _ref4$value;
552
- return optionValue === 'document-' ? "document-".concat(storyId) : optionValue;
552
+ optionValue = _ref4$value === void 0 ? null : _ref4$value,
553
+ _ref4$label = _ref4.label,
554
+ label = _ref4$label === void 0 ? null : _ref4$label;
555
+ return optionValue === 'document-' ? {
556
+ value: "document-".concat(storyId),
557
+ label: label
558
+ } : {
559
+ value: optionValue,
560
+ label: label
561
+ };
553
562
  })
554
563
  });
555
564
  }
package/lib/index.js CHANGED
@@ -182,8 +182,9 @@ var defaultFields = [{
182
182
  component: 'select',
183
183
  requestUrl: '/api/medias/tags',
184
184
  optionLabelPath: 'name',
185
- optionValuePath: 'name',
186
- // Uses taggable
185
+ optionValuePath: 'id',
186
+ // Uses taggable so change the logic here
187
+ valueIsOption: true,
187
188
  multiple: true,
188
189
  paginated: false
189
190
  }]
@@ -588,8 +589,16 @@ function MediaGallery(_ref) {
588
589
  options: (options || []).map(function () {
589
590
  var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
590
591
  _ref4$value = _ref4.value,
591
- optionValue = _ref4$value === void 0 ? null : _ref4$value;
592
- return optionValue === 'document-' ? "document-".concat(storyId) : optionValue;
592
+ optionValue = _ref4$value === void 0 ? null : _ref4$value,
593
+ _ref4$label = _ref4.label,
594
+ label = _ref4$label === void 0 ? null : _ref4$label;
595
+ return optionValue === 'document-' ? {
596
+ value: "document-".concat(storyId),
597
+ label: label
598
+ } : {
599
+ value: optionValue,
600
+ label: label
601
+ };
593
602
  })
594
603
  });
595
604
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/media-gallery",
3
- "version": "0.3.531",
3
+ "version": "0.3.533",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -87,5 +87,5 @@
87
87
  "access": "public",
88
88
  "registry": "https://registry.npmjs.org/"
89
89
  },
90
- "gitHead": "e3a59c467ad33528b38eb4badd78b6ed0e38a3a6"
90
+ "gitHead": "1ad634a7582231541d00a15fce213bd3a8d22aa9"
91
91
  }