chore: onChange event is added

This commit is contained in:
Palash gupta 2022-03-23 19:03:05 +05:30
parent 44d3f35a5f
commit deff5d5e17
No known key found for this signature in database
GPG Key ID: 8FD05AE6F9150AD6

View File

@ -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;
}
}}
/>
);
}