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.
@@ -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 (event) {
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 form-check-inline"
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)), /*#__PURE__*/_react["default"].createElement("label", {
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, isChecked) {
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, isChecked);
132
+ props.onCheckboxClick(fieldName);
134
133
  }
135
134
  };
136
135
  return /*#__PURE__*/_react["default"].createElement(_reactIntl.IntlProvider, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-form-builder-more-flexibility",
3
- "version": "1.0.48",
3
+ "version": "1.0.51",
4
4
  "description": "A complete form builder for react.",
5
5
  "main": "lib/index.js",
6
6
  "types": "types/index.d.ts",