question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to set it up with Formik?

See original GitHub issue

Thanks for the wonderful editor.

I am trying to set it up with Formik but it’s not working. Can anyone help me with this.

I tried using Formik’s setFieldValue() also via React-Quill’s onChange() but that also is not working.

My basic setup looks like this

<Field
	name="designation"
	value={this.props.values.designation}
	render={({ field /* _form */ }) => (
		// <input {...field} placeholder="designation" />
		<ReactQuill
			{...field}
		/>
	)}
/>

<input> works but <ReactQuill /> fails.

Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:8

github_iconTop GitHub Comments

2reactions
christiantigrecommented, Dec 17, 2019

I use <ReactQuill theme={“snow”} name={“contrato”} id={“contrato”} value={values.contrato} modules={this.props.modules} onChange={event => setFieldValue(“contrato”, event)} onBlur={() => setFieldTouched(“contrato”, true)} valid={!errors.estado} invalid={touched.estado && !!errors.estado} autoFocus={true} />

1reaction
alexdunnecommented, Jul 8, 2019

https://github.com/jaredpalmer/formik/issues/1383#issuecomment-493934980

<Formik initialValues={{ content: '' }}>
    <Field name="content">
        {({ field }) => <ReactQuill value={field.value} onChange={field.onChange(field.name)} />}
    </Field>
</Formik>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial - Formik
There are two ways to complete this tutorial: you can either write the code in your browser, or you can set up a...
Read more >
Building forms with Formik in React - LogRocket Blog
Building forms with React involves setting up state as the container for user data and props as the means to control how state...
Read more >
Building Forms in React with Formik [Examples] - KnowledgeHut
In ReactJS, the purpose of Formik is to create a scalable and performant form helper with a very simple API. Other React form...
Read more >
How to Use Formik to Create Forms in React - MakeUseOf
Create a React App ... Now, navigate to the formik-form/src folder and delete all the files except App.js. Next, create a new file...
Read more >
Using Formik to Handle Forms in React - CSS-Tricks
We'll start with a React component then integrate Formik while ... If you take a closer look, we didn't have to set up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found