oolib 2.127.5 → 2.128.0

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.
@@ -1,5 +1,5 @@
1
1
  export default RadioListMultiQuestion;
2
- declare function RadioListMultiQuestion({ label, sublabel, options, subQuestionLabels, onChange, value: _value, readOnly }: {
2
+ declare function RadioListMultiQuestion({ label, sublabel, options, subQuestionLabels, onChange, value, readOnly }: {
3
3
  label: any;
4
4
  sublabel: any;
5
5
  options: any;
@@ -42,16 +42,15 @@ var BlockLabel_1 = require("../BlockLabel");
42
42
  var themes_1 = require("../../themes");
43
43
  var greyColor10 = themes_1.colors.greyColor10;
44
44
  var RadioListMultiQuestion = function (_a) {
45
- var label = _a.label, sublabel = _a.sublabel, options = _a.options, subQuestionLabels = _a.subQuestionLabels, onChange = _a.onChange, _value = _a.value, readOnly = _a.readOnly;
46
- var _b = (0, react_1.useState)(_value), value = _b[0], setValue = _b[1];
45
+ // const [ value, setValue ] = useState(_value);
46
+ var label = _a.label, sublabel = _a.sublabel, options = _a.options, subQuestionLabels = _a.subQuestionLabels, onChange = _a.onChange, value = _a.value, readOnly = _a.readOnly;
47
47
  var handleChange = function (subQuestionValue, option) {
48
48
  // const key = `${label.trim().replaceAll(' ','').toLowerCase()}.${subQuestionValue}`
49
49
  var display = option.display, optionValue = option.value;
50
- setValue(function (prevValue) {
50
+ onChange(function (prevValue) {
51
51
  var _a;
52
52
  return (__assign(__assign({}, prevValue), (_a = {}, _a[subQuestionValue] = { display: display, value: optionValue }, _a)));
53
53
  });
54
- onChange(value);
55
54
  };
56
55
  return (react_1.default.createElement("div", null,
57
56
  react_1.default.createElement(BlockLabel_1.BlockLabel, { label: label, sublabel: sublabel }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oolib",
3
- "version": "2.127.5",
3
+ "version": "2.128.0",
4
4
  "description": " OKE Component Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",