react-form-builder-more-flexibility 1.0.7 → 1.0.9

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/lib/toolbar.js CHANGED
@@ -497,21 +497,21 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
497
497
  if (item.class_name) {
498
498
  elementOptions.class_name = item.class_name;
499
499
  }
500
- if (item.element === 'Image') {
500
+ if (element === 'Image') {
501
501
  elementOptions.src = item.src;
502
502
  }
503
- if (item.element === 'DatePicker') {
503
+ if (element === 'DatePicker') {
504
504
  elementOptions.dateFormat = item.dateFormat;
505
505
  elementOptions.timeFormat = item.timeFormat;
506
506
  elementOptions.showTimeSelect = item.showTimeSelect;
507
507
  elementOptions.showTimeSelectOnly = item.showTimeSelectOnly;
508
508
  elementOptions.showTimeInput = item.showTimeInput;
509
509
  }
510
- if (item.element === 'Download') {
510
+ if (element === 'Download') {
511
511
  elementOptions._href = item._href;
512
512
  elementOptions.file_path = item.file_path;
513
513
  }
514
- if (item.element === 'Range') {
514
+ if (element === 'Range') {
515
515
  elementOptions.step = item.step;
516
516
  elementOptions.default_value = item.default_value;
517
517
  elementOptions.min_value = item.min_value;
@@ -519,7 +519,7 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
519
519
  elementOptions.min_label = item.min_label;
520
520
  elementOptions.max_label = item.max_label;
521
521
  }
522
- if (item.element === 'MultiColumnRow') {
522
+ if (element === 'MultiColumnRow') {
523
523
  elementOptions.col_count = item.col_count;
524
524
  }
525
525
  if (item.defaultValue) {
@@ -533,7 +533,11 @@ var Toolbar = /*#__PURE__*/function (_React$Component) {
533
533
  }
534
534
  if (item.options) {
535
535
  if (item.options.length > 0) {
536
- elementOptions.options = item.options;
536
+ elementOptions.options = item.options.map(function (x) {
537
+ return _objectSpread(_objectSpread({}, x), {}, {
538
+ key: "custom_option_".concat(_UUID["default"].uuid())
539
+ });
540
+ });
537
541
  } else {
538
542
  elementOptions.options = Toolbar._defaultItemOptions(elementOptions.element, intl);
539
543
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-form-builder-more-flexibility",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "A complete form builder for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",