Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
onChange={event => {
const path = ReactEditor.findPath(editor, element)
Transforms.setNodes(
editor,
{ checked: event.target.checked },
{ at: path }
)
}}
/>