react-form-builder-more-flexibility 1.0.48 → 1.0.51
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/app.js +1 -1
- package/lib/form-elements/index.js +5 -4
- package/lib/index.js +2 -3
- package/package.json +1 -1
|
@@ -604,8 +604,7 @@ var Checkbox = /*#__PURE__*/function (_React$Component14) {
|
|
|
604
604
|
_this11.props.onCheckboxClick(_this11.props.data); // Pass the field name or data to the parent component
|
|
605
605
|
}
|
|
606
606
|
});
|
|
607
|
-
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this11), "handleLabelClick", function (
|
|
608
|
-
event.preventDefault();
|
|
607
|
+
(0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this11), "handleLabelClick", function () {
|
|
609
608
|
if (_this11.props.data && _this11.props.data.hasPopUp) {
|
|
610
609
|
_this11.clickDetected();
|
|
611
610
|
}
|
|
@@ -640,11 +639,13 @@ var Checkbox = /*#__PURE__*/function (_React$Component14) {
|
|
|
640
639
|
passUpClick: this.clickDetected,
|
|
641
640
|
className: "form-label"
|
|
642
641
|
}, this.props)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
643
|
-
className: "form-check
|
|
642
|
+
className: "form-check"
|
|
644
643
|
}, /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({
|
|
645
644
|
className: "form-check-input",
|
|
646
645
|
id: this.props.data.field_name
|
|
647
|
-
}, props
|
|
646
|
+
}, props, {
|
|
647
|
+
onClick: this.clickDetected
|
|
648
|
+
})), /*#__PURE__*/_react["default"].createElement("label", {
|
|
648
649
|
className: "form-check-label",
|
|
649
650
|
onClick: this.handleLabelClick,
|
|
650
651
|
htmlFor: this.props.data.field_name,
|
package/lib/index.js
CHANGED
|
@@ -126,11 +126,10 @@ var ReactFormBuilder = exports.ReactFormBuilder = /*#__PURE__*/function (_React$
|
|
|
126
126
|
function ReactFormGenerator(props) {
|
|
127
127
|
var language = props.locale ? props.locale : 'en';
|
|
128
128
|
var currentAppLocale = _languageProvider["default"][language];
|
|
129
|
-
var handleCheckboxClick = function handleCheckboxClick(fieldName
|
|
130
|
-
console.log("Checkbox clicked: ".concat(fieldName, ", Checked: ").concat(isChecked));
|
|
129
|
+
var handleCheckboxClick = function handleCheckboxClick(fieldName) {
|
|
131
130
|
// Handle the checkbox click event here or pass it up to a parent
|
|
132
131
|
if (props.onCheckboxClick) {
|
|
133
|
-
props.onCheckboxClick(fieldName
|
|
132
|
+
props.onCheckboxClick(fieldName);
|
|
134
133
|
}
|
|
135
134
|
};
|
|
136
135
|
return /*#__PURE__*/_react["default"].createElement(_reactIntl.IntlProvider, {
|