Skip to content

Commit

Permalink
fix(): revert to using value
Browse files Browse the repository at this point in the history
  • Loading branch information
nckhell committed Dec 18, 2024
1 parent e9917c7 commit f59167a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const RemoteSingleSelectAction: FC<RemoteSingleSelectActionProps> = ({
}, 500)

const handleSubmit = useCallback(() => {
if (isNil(selectedOption) || isNil(selectedOption.value_string)) {
if (isNil(selectedOption) || isNil(selectedOption.value)) {
setError(t('activities.form.question_required_error'))
return
}
Expand All @@ -151,7 +151,7 @@ export const RemoteSingleSelectAction: FC<RemoteSingleSelectActionProps> = ({
const handleOptionChange = useCallback(
(value: number | Array<Option> | string) => {
const selectedOption = options.find(
(option) => option.value_string === value.toString()
(option) => option.value === value.toString()
)
setSelectedOption(selectedOption)
},
Expand Down Expand Up @@ -185,7 +185,7 @@ export const RemoteSingleSelectAction: FC<RemoteSingleSelectActionProps> = ({
setSearchText(value)
}}
type="single"
value={selectedOption?.value_string ?? ''}
value={selectedOption?.value ?? ''}
onChange={handleOptionChange}
mandatory={mandatory === 'true'}
filtering
Expand Down

0 comments on commit f59167a

Please sign in to comment.