Skip to content

Instantly share code, notes, and snippets.

@crrmacarse
Last active October 16, 2020 02:44
Show Gist options
  • Save crrmacarse/211b25b9f9e534bc03c565be68bf1e66 to your computer and use it in GitHub Desktop.
Save crrmacarse/211b25b9f9e534bc03c565be68bf1e66 to your computer and use it in GitHub Desktop.
How add ts-ignore in jsx
<FormControl
{...otherProps}
variant="outlined"
fullWidth
>
<Field name={name}>
{({ input, meta: { touched, error, submitError } }) => (
<Fragment>
<FormLabel>{label}</FormLabel>
{/*
// @ts-ignore they have no support for type definitions */}
<CKEditor
{...input}
editor={ClassicEditor}
config={{
toolbar: ['bold', 'italic', 'numberedList', 'bulletedList', 'link', 'unlink'],
placeholder,
}}
data={input.value}
onChange={(_, editor) => input.onChange(editor.getData())}
/>
{touched && (error || submitError)
&& <FormHelperText error>{error || submitError}</FormHelperText>}
</Fragment>
)}
</Field>
</FormControl>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment