@@ -2,7 +2,7 @@ import { Editor } from '@monaco-editor/react';
22import type { ComponentProps } from 'react' ;
33import { Button , Panel , Toolbar } from '@ui5/webcomponents-react' ;
44import { parseDocument } from 'yaml' ;
5- import { useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
5+ import { useCallback , useEffect , useMemo , useState } from 'react' ;
66import { useTheme } from '../../hooks/useTheme' ;
77import { GITHUB_DARK_DEFAULT , GITHUB_LIGHT_DEFAULT } from '../../lib/monaco.ts' ;
88import { 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