Skip to content

Commit

Permalink
fix: Selection flashing on both source editor and file explorer
Browse files Browse the repository at this point in the history
  • Loading branch information
erdkse committed Aug 31, 2021
1 parent 0abaf49 commit 1b6a867
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
22 changes: 12 additions & 10 deletions src/components/molecules/Monaco/Monaco.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -360,16 +360,18 @@ const Monaco = (props: {editorHeight: string}) => {
</HiddenInputContainer>
</MonacoButtons>
<MonacoContainer ref={containerRef}>
<MonacoEditor
width={width}
height={editorHeight}
language="yaml"
theme={KUBESHOP_MONACO_THEME}
value={code}
options={options}
onChange={onChange}
editorDidMount={editorDidMount}
/>
{firstCodeLoadedOnEditor && (
<MonacoEditor
width={width}
height={editorHeight}
language="yaml"
theme={KUBESHOP_MONACO_THEME}
value={code}
options={options}
onChange={onChange}
editorDidMount={editorDidMount}
/>
)}
</MonacoContainer>
</>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/FileTreePane/FileTreePane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ const FileTreePane = () => {
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedResourceId]);
}, [selectedResourceId, tree]);

useEffect(() => {
// removes any highlight when a file is selected
Expand Down

0 comments on commit 1b6a867

Please sign in to comment.