Last active
October 16, 2020 02:44
-
-
Save crrmacarse/211b25b9f9e534bc03c565be68bf1e66 to your computer and use it in GitHub Desktop.
How add ts-ignore in jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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