-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Warning: A component is contentEditable
and contains children
managed by React
#53
Comments
You aren't doing anything wrong. This a known issue (http://facebook.github.io/draft-js/docs/advanced-topics-issues-and-pitfalls.html#react-contenteditable-warning) and it's being tracked in the react repo: facebook/react#5837 |
Yep, really looking forward to eliminating this warning. :) |
I ended up adding this code to my project as a temporary solution:
|
@davisml crazy, I was just looking for a way to do this. |
@jarsbe I'm glad I could help! :) |
@davisml That's some speedy tech support, cheers! |
This will come into effect with the 15.0 release of React, see facebook/react#6112 Fixes facebookarchive#53
As an alternative you can set your console filter to regexp mode with the value: |
One more alternative is to add contentEditable attribute later on in componentDidMount() method. This produces no warning for me
|
With the suppressContentEditableWarning prop you can solve this issue |
@RTeran this is real solution 👍 |
|
The following is an example editor component
`
import React from 'react';
import {Editor, EditorState} from 'draft-js';
export default class MyEditor extends React.Component {
}
`
And in my parent component
import MyEditor from './MyEditor'
.... // in the render() method
`
render() {
let error = this.getError();
`
And I see this warning
Warning: A component is
contentEditable
and containschildren
managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.The text was updated successfully, but these errors were encountered: