@omniumretail/component-library 1.2.6 → 1.2.7
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/package.json
CHANGED
|
@@ -22,8 +22,8 @@ export const SingleQuestion = ({
|
|
|
22
22
|
...restField
|
|
23
23
|
}: any) => {
|
|
24
24
|
|
|
25
|
-
const responseTypeCurrentValue = form
|
|
26
|
-
const initialEmphasisValue = form
|
|
25
|
+
const responseTypeCurrentValue = form?.getFieldsValue()?.questions?.[name]?.responseType;
|
|
26
|
+
const initialEmphasisValue = form?.getFieldsValue()?.questions?.[name]?.emphasis;
|
|
27
27
|
|
|
28
28
|
const [mandatoryCheckbox, setMandatoryCheckbox] = useState<boolean>(false);
|
|
29
29
|
const [emphasisCheckbox, setEmphasisCheckbox] = useState<boolean>(initialEmphasisValue ? initialEmphasisValue : true);
|
|
@@ -224,7 +224,7 @@ export const SingleQuestion = ({
|
|
|
224
224
|
<span>{t('components.category.mandatoryAnswer')}</span>
|
|
225
225
|
</div>
|
|
226
226
|
|
|
227
|
-
{filteredResponsesEmphasised?.includes(form
|
|
227
|
+
{filteredResponsesEmphasised?.includes(form?.getFieldsValue()?.questions?.[name]?.responseType) &&
|
|
228
228
|
<div className={styles.checkboxContainer}>
|
|
229
229
|
<Input
|
|
230
230
|
addonBefore={
|
|
@@ -253,7 +253,7 @@ export const SingleQuestion = ({
|
|
|
253
253
|
</div>
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
-
{filteredResponsesMultiple?.includes(form
|
|
256
|
+
{filteredResponsesMultiple?.includes(form?.getFieldsValue()?.questions?.[name]?.responseType) &&
|
|
257
257
|
< div className={styles.checkboxContainer}>
|
|
258
258
|
<Form.Item
|
|
259
259
|
{...restField}
|