react-survey-builder 1.0.100 → 1.0.101
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/bundle.js +2 -2
- package/lib/form-steps.js +1 -6
- package/lib/survey-elements/index.js +21 -5
- package/package.json +1 -1
    
        package/lib/form-steps.js
    CHANGED
    
    | @@ -371,12 +371,7 @@ var ReactSurveyFormSteps = function ReactSurveyFormSteps(_ref) { | |
| 371 371 | 
             
                      checkboxButtonClassName: item.element === 'RadioButtons' || item.element === 'ButtonList' || item.element === 'Checkbox' ? checkboxButtonClassName !== null && checkboxButtonClassName !== void 0 ? checkboxButtonClassName : null : null,
         | 
| 372 372 | 
             
                      labelClassName: labelClassName,
         | 
| 373 373 | 
             
                      helpClassName: helpClassName,
         | 
| 374 | 
            -
                      onSelect: item.element === 'ButtonList' ?  | 
| 375 | 
            -
                        if (item.element === 'ButtonList') {
         | 
| 376 | 
            -
                          _onChange(e);
         | 
| 377 | 
            -
                          handleSelect(e);
         | 
| 378 | 
            -
                        }
         | 
| 379 | 
            -
                      } : undefined
         | 
| 374 | 
            +
                      onSelect: item.element === 'ButtonList' ? handleSelect : undefined
         | 
| 380 375 | 
             
                    });
         | 
| 381 376 | 
             
                  }
         | 
| 382 377 | 
             
                });
         | 
| @@ -2201,18 +2201,34 @@ export var ButtonList = /*#__PURE__*/function (_React$Component5) { | |
| 2201 2201 | 
             
                      value: option.value,
         | 
| 2202 2202 | 
             
                      checked: (self === null || self === void 0 || (_self$props16 = self.props) === null || _self$props16 === void 0 ? void 0 : _self$props16.value) === option.value,
         | 
| 2203 2203 | 
             
                      onChange: function onChange(e) {
         | 
| 2204 | 
            -
                        var _self$props17;
         | 
| 2204 | 
            +
                        var _self$props17, _self$props18;
         | 
| 2205 | 
            +
                        console.log('onChange', e.target.value);
         | 
| 2205 2206 | 
             
                        if ((self === null || self === void 0 || (_self$props17 = self.props) === null || _self$props17 === void 0 ? void 0 : _self$props17.onChange) !== undefined) {
         | 
| 2206 | 
            -
                          // console.log(e.target.value); 
         | 
| 2207 2207 | 
             
                          self.props.onChange(e.target.value);
         | 
| 2208 2208 | 
             
                        }
         | 
| 2209 | 
            +
                        if ((self === null || self === void 0 || (_self$props18 = self.props) === null || _self$props18 === void 0 ? void 0 : _self$props18.onSelect) !== undefined) {
         | 
| 2210 | 
            +
                          self.props.onSelect(e.target.value);
         | 
| 2211 | 
            +
                        }
         | 
| 2209 2212 | 
             
                      },
         | 
| 2210 2213 | 
             
                      onClick: function onClick(e) {
         | 
| 2211 | 
            -
                        var _self$ | 
| 2212 | 
            -
                         | 
| 2213 | 
            -
             | 
| 2214 | 
            +
                        var _self$props19, _self$props20;
         | 
| 2215 | 
            +
                        console.log('onClick', e.target.value);
         | 
| 2216 | 
            +
                        if ((self === null || self === void 0 || (_self$props19 = self.props) === null || _self$props19 === void 0 ? void 0 : _self$props19.onSelect) !== undefined) {
         | 
| 2214 2217 | 
             
                          self.props.onSelect(e.target.value);
         | 
| 2215 2218 | 
             
                        }
         | 
| 2219 | 
            +
                        if ((self === null || self === void 0 || (_self$props20 = self.props) === null || _self$props20 === void 0 ? void 0 : _self$props20.onChange) !== undefined) {
         | 
| 2220 | 
            +
                          self.props.onChange(e.target.value);
         | 
| 2221 | 
            +
                        }
         | 
| 2222 | 
            +
                      },
         | 
| 2223 | 
            +
                      onSelect: function onSelect(e) {
         | 
| 2224 | 
            +
                        var _self$props21, _self$props22;
         | 
| 2225 | 
            +
                        console.log('onSelect', e.target.value);
         | 
| 2226 | 
            +
                        if ((self === null || self === void 0 || (_self$props21 = self.props) === null || _self$props21 === void 0 ? void 0 : _self$props21.onSelect) !== undefined) {
         | 
| 2227 | 
            +
                          self.props.onSelect(e.target.value);
         | 
| 2228 | 
            +
                        }
         | 
| 2229 | 
            +
                        if ((self === null || self === void 0 || (_self$props22 = self.props) === null || _self$props22 === void 0 ? void 0 : _self$props22.onChange) !== undefined) {
         | 
| 2230 | 
            +
                          self.props.onChange(e.target.value);
         | 
| 2231 | 
            +
                        }
         | 
| 2216 2232 | 
             
                      }
         | 
| 2217 2233 | 
             
                    }, /*#__PURE__*/React.createElement("div", {
         | 
| 2218 2234 | 
             
                      className: "d-flex align-items-center justify-content-start text-black text-survey-builder-checkbox"
         |