From deff5d5e17d2fcdf18918dccd6a9cc0eb93c497a Mon Sep 17 00:00:00 2001 From: Palash gupta Date: Wed, 23 Mar 2022 19:03:05 +0530 Subject: [PATCH] chore: onChange event is added --- frontend/src/components/Editor/index.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/Editor/index.tsx b/frontend/src/components/Editor/index.tsx index 790b99c9f9..51a024f607 100644 --- a/frontend/src/components/Editor/index.tsx +++ b/frontend/src/components/Editor/index.tsx @@ -9,6 +9,12 @@ function Editor({ value }: EditorProps): JSX.Element { value={value.current} options={{ fontSize: 16, automaticLayout: true }} height="40vh" + onChange={(newValue): void => { + if (value.current && newValue) { + // eslint-disable-next-line no-param-reassign + value.current = newValue; + } + }} /> ); }