diff --git a/app/w/components/workflow-block/sub-block/components/dropdown.tsx b/app/w/components/workflow-block/sub-block/components/dropdown.tsx index caf4b10200..8203251fa0 100644 --- a/app/w/components/workflow-block/sub-block/components/dropdown.tsx +++ b/app/w/components/workflow-block/sub-block/components/dropdown.tsx @@ -5,6 +5,7 @@ import { SelectTrigger, SelectValue, } from '@/components/ui/select' +import { useSubBlockValue } from '../hooks/use-sub-block-value' interface DropdownProps { options: string[] @@ -19,8 +20,13 @@ export function Dropdown({ blockId, subBlockId, }: DropdownProps) { + const [value, setValue] = useSubBlockValue(blockId, subBlockId) + return ( - setValue(value)} + > diff --git a/app/w/components/workflow-block/sub-block/components/long-input.tsx b/app/w/components/workflow-block/sub-block/components/long-input.tsx index 4afc3e0dbd..d42d4512ca 100644 --- a/app/w/components/workflow-block/sub-block/components/long-input.tsx +++ b/app/w/components/workflow-block/sub-block/components/long-input.tsx @@ -1,5 +1,5 @@ import { Textarea } from '@/components/ui/textarea' -import { useState } from 'react' +import { useSubBlockValue } from '../hooks/use-sub-block-value' interface LongInputProps { placeholder?: string @@ -12,14 +12,14 @@ export function LongInput({ blockId, subBlockId, }: LongInputProps) { - const [value, setValue] = useState('') + const [value, setValue] = useSubBlockValue(blockId, subBlockId) return (