Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions Composer/packages/lib/code-editor/src/BaseEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ export function BaseEditor(props: BaseEditorProps) {
editor.setHiddenAreas(hiddenRanges);
}
};
useEffect(() => {
updateEditorCodeRangeUI(editor);
}, [codeRange]);

const editorDidMount = (editor: monacoEditor.editor.IStandaloneCodeEditor, monaco: typeof monacoEditor) => {
if (typeof props.editorDidMount === 'function') {
Expand Down
7 changes: 1 addition & 6 deletions Composer/packages/lib/code-editor/src/RichEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,6 @@ export function RichEditor(props: RichEditorProps) {
}
);

const baseEditor = <BaseEditor {...rest} placeholder={hidePlaceholder ? undefined : placeholder} />;
// CodeRange editing require an non-controled/refresh component, so here make it memoed
const memoEditor = useMemo(() => {
return baseEditor;
}, []);
const getHeight = () => {
if (height === null || height === undefined) {
return '100%';
Expand Down Expand Up @@ -69,7 +64,7 @@ export function RichEditor(props: RichEditorProps) {
onMouseEnter={() => setHovered(true)}
onMouseLeave={() => setHovered(false)}
>
{props.codeRange ? memoEditor : baseEditor}
<BaseEditor {...rest} placeholder={hidePlaceholder ? undefined : placeholder} />
</div>
{isInvalid && (
<div style={{ fontSize: '14px', color: SharedColors.red20 }}>
Expand Down