Skip to content

Commit

Permalink
fix: Fix theme props issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 18, 2022
1 parent ab74927 commit fd4c3e8
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,12 @@ function MonacoEditor(props: MonacoEditorProps, ref: ((instance: RefEditorInstan
});
}, []);

useEffect(() => {
if (options.theme) {
monaco.editor.setTheme(options.theme);
}
}, [options.theme])

useEffect(() => {
if (value !== val && editor.current) {
if (autoComplete) {
Expand Down

0 comments on commit fd4c3e8

Please sign in to comment.