react-form-builder-more-flexibility 1.0.68 → 1.0.69
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/845.app.js +1 -1
- package/dist/app.js +1 -1
- package/lib/form-elements/index.js +6 -1
- package/lib/form-elements-edit.js +1 -1
- package/lib/form.js +2 -1
- package/package.json +1 -1
|
@@ -347,8 +347,13 @@ var Dropdown = /*#__PURE__*/function (_React$Component0) {
|
|
|
347
347
|
props.className = 'form-control';
|
|
348
348
|
props.name = this.props.data.field_name;
|
|
349
349
|
var placeholder = this.props.data.placeholder;
|
|
350
|
+
if (placeholder) {
|
|
351
|
+
props.defaultValue = '';
|
|
352
|
+
}
|
|
350
353
|
if (this.props.mutable) {
|
|
351
|
-
|
|
354
|
+
if (this.props.defaultValue !== undefined) {
|
|
355
|
+
props.defaultValue = this.props.defaultValue;
|
|
356
|
+
}
|
|
352
357
|
props.ref = this.inputField;
|
|
353
358
|
}
|
|
354
359
|
if (this.props.read_only) {
|
|
@@ -712,7 +712,7 @@ var FormElementsEdit = exports["default"] = /*#__PURE__*/function (_React$Compon
|
|
|
712
712
|
htmlFor: "do-italic"
|
|
713
713
|
}, /*#__PURE__*/_react["default"].createElement(_IntlMessages["default"], {
|
|
714
714
|
id: "italic"
|
|
715
|
-
})))), el.showPlaceholder && /*#__PURE__*/_react["default"].createElement("div", {
|
|
715
|
+
})))), (el.showPlaceholder || el.element === 'Dropdown') && /*#__PURE__*/_react["default"].createElement("div", {
|
|
716
716
|
className: "form-group"
|
|
717
717
|
}, /*#__PURE__*/_react["default"].createElement("label", {
|
|
718
718
|
className: "control-label",
|
package/lib/form.js
CHANGED
|
@@ -317,7 +317,8 @@ var ReactForm = /*#__PURE__*/function (_React$Component) {
|
|
|
317
317
|
_this5._getSignatureImg(item);
|
|
318
318
|
}
|
|
319
319
|
if (_this5._isInvalid(item)) {
|
|
320
|
-
|
|
320
|
+
var fieldName = item.label && item.label.trim() || item.placeholder || item.field_name;
|
|
321
|
+
errors.push("".concat(fieldName, " ").concat(intl.formatMessage({
|
|
321
322
|
id: 'message.is-required'
|
|
322
323
|
}), "!"));
|
|
323
324
|
}
|