optimized-react-component-library-xyz123 0.26.2 → 0.26.4
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/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -169,7 +169,7 @@ var MultipleCheckboxes = ({
|
|
|
169
169
|
const initialValues = ((_a2 = question.options) == null ? void 0 : _a2.filter((option) => {
|
|
170
170
|
var _a3;
|
|
171
171
|
return (_a3 = question.answer) == null ? void 0 : _a3.includes(option.id);
|
|
172
|
-
}).map((option) => option.
|
|
172
|
+
}).map((option) => option.id)) || [];
|
|
173
173
|
console.log("Initial values:", initialValues);
|
|
174
174
|
setCheckedValues(initialValues);
|
|
175
175
|
}, [question.answer, question.options]);
|
|
@@ -224,7 +224,7 @@ var PrevieMultipleCheckboxes = ({
|
|
|
224
224
|
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dt", { id: `question-${previewId}`, children: (_a = question.previewLabel) != null ? _a : question.questionLabel }),
|
|
225
225
|
question.answer ? question.options && question.options.length === 1 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: question.options[0].label }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("ul", { className: "pts-preview-answer-list", children: (_b = question.options) == null ? void 0 : _b.filter((option) => {
|
|
226
226
|
var _a2;
|
|
227
|
-
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.
|
|
227
|
+
return (_a2 = question.answer) == null ? void 0 : _a2.includes(option.id);
|
|
228
228
|
}).map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("li", { children: option.label }, index)) }) }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("dd", { className: "no-answer-preview-page", children: activatedLanguage === "en" ? "No Answer" : "Inget svar" }),
|
|
229
229
|
" "
|
|
230
230
|
] });
|