From a95ec9249d3edad80d37596b3618695a3e8a8ff7 Mon Sep 17 00:00:00 2001 From: Josias Date: Wed, 31 Mar 2021 22:45:20 +0200 Subject: [PATCH] Correct onDOMBeforeInput typings (#3549) TS will report an error when trying to access event.inputType since it was declared of type "Event" and not "InputEvent". --- 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 1529246b0..9ce418da8 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -89,7 +89,7 @@ export interface RenderLeafProps { export type EditableProps = { decorate?: (entry: NodeEntry) => Range[] - onDOMBeforeInput?: (event: Event) => void + onDOMBeforeInput?: (event: InputEvent) => void placeholder?: string readOnly?: boolean role?: string