kitconcept / volto-form-builder

An interactive form builder for Volto, that allows editors to assemble forms via drag and drop.
4 stars 5 forks source link

"TypeError: props.onChange is not a function" when entering text into a form field #4

Closed tisto closed 4 years ago

tisto commented 4 years ago

Form

1) Create a simple form with subject, text, submit (subject and text are required) 2) Type in "hello" into the subject field -> error trace:

TypeError: props.onChange is not a function
onChange
src/addons/volto-form-builder/src/components/Input/View.jsx:9
   6 | const [input, setInput] = useState('');
   7 | const onChange = (id, value) => {
   8 |   setInput(value);
>  9 |   props.onChange(props.data.input, value);
     | ^  10 | };
  11 | return (
  12 |   <Form>
View compiled
▶ 28 stack frames were collapsed.