diff --git a/website/src/components/Survey/LabelRadioGroup.tsx b/website/src/components/Survey/LabelRadioGroup.tsx index b4b8385e..fff0e7fb 100644 --- a/website/src/components/Survey/LabelRadioGroup.tsx +++ b/website/src/components/Survey/LabelRadioGroup.tsx @@ -22,7 +22,7 @@ export const LabelRadioGroup = (props: LabelRadioGroupProps) => { clickHandler={(newValue) => { const newState = labelValues.slice(); newState[idx] = newValue; - props.onChange(labelValues); + props.onChange(newState); setLabelValues(newState); if (!interactionFlag) setInteractionFlag(true); }} diff --git a/website/src/components/Survey/LabelSliderGroup.tsx b/website/src/components/Survey/LabelSliderGroup.tsx index 27061461..7ab988f8 100644 --- a/website/src/components/Survey/LabelSliderGroup.tsx +++ b/website/src/components/Survey/LabelSliderGroup.tsx @@ -22,7 +22,7 @@ export const LabelSliderGroup = ({ labelIDs, onChange, isEditable }: LabelSlider sliderHandler={(sliderValue) => { const newState = sliderValues.slice(); newState[idx] = sliderValue; - onChange(sliderValues); + onChange(newState); setSliderValues(newState); }} isEditable={isEditable} @@ -49,7 +49,12 @@ function CheckboxSliderItem(props: { {/* TODO: display real text instead of just the id */} {props.labelId} - props.sliderHandler(val / 100)}> + props.sliderHandler(val / 100)} + >