From f8c8ae85964e76869e1ebafa3947953f154f1542 Mon Sep 17 00:00:00 2001 From: Ziad Beyens Date: Thu, 28 Nov 2019 16:31:11 +0100 Subject: [PATCH] fix: make onDOMBeforeInput optional (#3138) Fix this typescript error: ``` Property 'onDOMBeforeInput' is missing in type '{}' but required in type ... ``` with this code: ``` ``` --- packages/slate-react/src/components/editable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 35f820291..41db22761 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -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