resetForm
Reset the entire form state and field state for the form.
Here is the live demo:
Loading...
function ResetForm() {const form = useForm({onSubmit(values) {alert(JSON.stringify(values, null, 2))console.log('values', values)},children: [{label: 'First Name',name: 'firstName',component: 'Input',value: 'Steve',},{label: 'Last Name',name: 'lastName',component: 'Input',value: 'Jobs',},{component: 'Box',css: 'spaceX2 toCenterY',children: [{component: 'Submit',text: 'Submit',},{component: 'Reset',text: 'Reset',},],},],})return <Form form={form} />}
LIVE DEMO