mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-27 09:04:31 +02:00
Handle readOnly inside contentEditable check list (#1689)
This commit is contained in:
committed by
Ian Storm Taylor
parent
35f101c80f
commit
7cf6e1d5a8
@@ -31,7 +31,7 @@ class CheckListItem extends React.Component {
|
||||
*/
|
||||
|
||||
render() {
|
||||
const { attributes, children, node } = this.props
|
||||
const { attributes, children, node, readOnly } = this.props
|
||||
const checked = node.data.get('checked')
|
||||
return (
|
||||
<div
|
||||
@@ -42,7 +42,7 @@ class CheckListItem extends React.Component {
|
||||
<span>
|
||||
<input type="checkbox" checked={checked} onChange={this.onChange} />
|
||||
</span>
|
||||
<span contentEditable suppressContentEditableWarning>
|
||||
<span contentEditable={!readOnly} suppressContentEditableWarning>
|
||||
{children}
|
||||
</span>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user