File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/components/Questionnaire/QuestionTypes Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export const ChoiceQuestion = memo(function ChoiceQuestion({
103
103
< SelectContent className = "max-w-[var(--radix-select-trigger-width)] w-full" >
104
104
{ options . map ( ( option : AnswerOption ) => (
105
105
< SelectItem
106
- key = { option . value . toString ( ) }
106
+ key = { ` ${ question . id } - ${ option . value . toString ( ) } ` }
107
107
value = { option . value . toString ( ) }
108
108
className = "whitespace-normal break-words py-3"
109
109
>
@@ -121,9 +121,9 @@ export const ChoiceQuestion = memo(function ChoiceQuestion({
121
121
>
122
122
{ options . map ( ( option : AnswerOption ) => (
123
123
< Label
124
- htmlFor = { option . value . toString ( ) }
124
+ htmlFor = { ` ${ question . id } - ${ option . value . toString ( ) } ` }
125
125
className = "cursor-pointer"
126
- key = { option . value . toString ( ) }
126
+ key = { ` ${ question . id } - ${ option . value . toString ( ) } ` }
127
127
>
128
128
< Card
129
129
className = "shadow-none rounded-md border-1 border-gray-400 bg-gray-200 p-2 transition-all hover:bg-gray-50/90 [&:has([data-state=checked])]:border-primary [&:has([data-state=checked])]:bg-primary-300 [&:has([data-state=checked])]:shadow-sm w-full"
@@ -132,7 +132,7 @@ export const ChoiceQuestion = memo(function ChoiceQuestion({
132
132
< div className = "flex flex-row items-center gap-2" >
133
133
< RadioGroupItem
134
134
value = { option . value . toString ( ) }
135
- id = { option . value . toString ( ) }
135
+ id = { ` ${ question . id } - ${ option . value . toString ( ) } ` }
136
136
className = "sr-only"
137
137
/>
138
138
< div className = "font-medium leading-5" >
You can’t perform that action at this time.
0 commit comments