@omniumretail/component-library 1.1.39 → 1.1.41
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.
|
@@ -4,6 +4,7 @@ interface CategoryResponse {
|
|
|
4
4
|
serverReadyData: any;
|
|
5
5
|
onNextCategoryAvailabilityChange: (hasNext: boolean) => void;
|
|
6
6
|
onPreviousCategoryAvailabilityChange: (hasPrevious: boolean) => void;
|
|
7
|
+
selectYesNoOption: any;
|
|
7
8
|
}
|
|
8
9
|
export declare const CategoryResponse: React.ForwardRefExoticComponent<CategoryResponse & React.RefAttributes<unknown>>;
|
|
9
10
|
export {};
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import styles from './styles.module.scss';
|
|
|
2
2
|
import { useEffect, useImperativeHandle, useState } from 'react';
|
|
3
3
|
import { Form } from 'antd';
|
|
4
4
|
import { useForm } from 'antd/es/form/Form';
|
|
5
|
-
import { Button } from '../Button';
|
|
6
5
|
import classNames from 'classnames';
|
|
7
6
|
import TextArea from 'antd/es/input/TextArea';
|
|
8
7
|
import { Select } from '../Select';
|
|
@@ -15,6 +14,7 @@ interface CategoryResponse {
|
|
|
15
14
|
serverReadyData: any;
|
|
16
15
|
onNextCategoryAvailabilityChange: (hasNext: boolean) => void;
|
|
17
16
|
onPreviousCategoryAvailabilityChange: (hasPrevious: boolean) => void;
|
|
17
|
+
selectYesNoOption: any;
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
type Category = {
|
|
@@ -24,17 +24,6 @@ type Category = {
|
|
|
24
24
|
Children?: Category[];
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const selectYesNoOption = [
|
|
28
|
-
{
|
|
29
|
-
value: 'Yes',
|
|
30
|
-
label: t('components.categoryResponse.yes'),
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
value: 'No',
|
|
34
|
-
label: t('components.categoryResponse.no'),
|
|
35
|
-
},
|
|
36
|
-
];
|
|
37
|
-
|
|
38
27
|
const updateCategoryAnswers = (CategoryAnswers: any[], categoryToUpdate: any, updatedQuestions: any) => {
|
|
39
28
|
CategoryAnswers.forEach((category: any) => {
|
|
40
29
|
if (category.Data.CategoryId === categoryToUpdate.CategoryId) {
|
|
@@ -277,7 +266,7 @@ export const CategoryResponse = React.forwardRef((props: CategoryResponse, ref)
|
|
|
277
266
|
? <Form.Item
|
|
278
267
|
name={["Questions", index, "Answer"]}
|
|
279
268
|
>
|
|
280
|
-
<Select options={selectYesNoOption}
|
|
269
|
+
<Select options={props.selectYesNoOption}
|
|
281
270
|
style={{ minWidth: '100%' }}
|
|
282
271
|
/>
|
|
283
272
|
</Form.Item>
|