Skip to content

Commit ffac619

Browse files
committed
Update YamlEditor.tsx
1 parent 19c0355 commit ffac619

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/components/YamlEditor/YamlEditor.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { Editor } from '@monaco-editor/react';
22
import type { ComponentProps } from 'react';
33
import { Button, Panel, Toolbar } from '@ui5/webcomponents-react';
44
import { parseDocument } from 'yaml';
5-
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
5+
import { useCallback, useEffect, useMemo, useState } from 'react';
66
import { useTheme } from '../../hooks/useTheme';
77
import { GITHUB_DARK_DEFAULT, GITHUB_LIGHT_DEFAULT } from '../../lib/monaco.ts';
88
import { useTranslation } from 'react-i18next';
@@ -40,9 +40,6 @@ export const YamlEditor = (props: YamlEditorProps) => {
4040
const [validationErrors, setValidationErrors] = useState<string[]>([]);
4141
const [applyAttempted, setApplyAttempted] = useState(false);
4242

43-
// Ref to the wrapper to scope global key handlers
44-
const wrapperRef = useRef<HTMLDivElement | null>(null);
45-
4643
useEffect(() => {
4744
if (window.Cypress) return;
4845

@@ -144,7 +141,7 @@ export const YamlEditor = (props: YamlEditorProps) => {
144141
</Button>
145142
</Toolbar>
146143
)}
147-
<div ref={wrapperRef} className={styles.editorWrapper}>
144+
<div className={styles.editorWrapper}>
148145
<Editor
149146
{...rest}
150147
value={isEdit ? editorContent : value}

0 commit comments

Comments
 (0)