1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-15 11:44:05 +02:00

fix: make onDOMBeforeInput optional (#3138)

Fix this typescript error:

```
Property 'onDOMBeforeInput' is missing in type '{}' but required in type ...
```

with this code:
```
<Slate editor={editor} defaultValue={defaultValue}>
  <Editable />
</Slate>
```
This commit is contained in:
Ziad Beyens
2019-11-28 16:31:11 +01:00
committed by Ian Storm Taylor
parent b2c5d57788
commit f8c8ae8596

View File

@@ -38,7 +38,7 @@ import {
export const Editable = (props: {
decorate?: (entry: NodeEntry) => Range[]
onDOMBeforeInput: (event: Event) => void
onDOMBeforeInput?: (event: Event) => void
placeholder?: string
readOnly?: boolean
role?: string