Skip to content

Commit

Permalink
Add onChange call back
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanph committed Sep 20, 2021
1 parent aee4e40 commit 6f23c45
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/slate-react/src/components/slate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const Slate = (props: {
})

const onContextChange = useCallback(() => {
onChange(editor.children)
setContext([editor])
}, [onChange])

Expand Down

0 comments on commit 6f23c45

Please sign in to comment.