@@ -65,6 +65,7 @@ type CypherEditorDefaultProps = {
6565 additionalCommands : Partial <
6666 Record < monaco . KeyCode , monaco . editor . ICommandHandler >
6767 >
68+ tabIndex ?: number
6869 useDb : null | string
6970 value : string
7071}
@@ -347,7 +348,8 @@ export class CypherEditor extends React.Component<
347348 selectionHighlight : false ,
348349 value : this . props . value ,
349350 wordWrap : 'on' ,
350- wrappingStrategy : 'advanced'
351+ wrappingStrategy : 'advanced' ,
352+ tabIndex : this . props . tabIndex
351353 } )
352354
353355 const { KeyCode, KeyMod } = monaco
@@ -438,7 +440,8 @@ export class CypherEditor extends React.Component<
438440 }
439441
440442 componentDidUpdate ( prevProps : CypherEditorProps ) : void {
441- const { useDb, fontLigatures, enableMultiStatementMode } = this . props
443+ const { useDb, fontLigatures, enableMultiStatementMode, tabIndex } =
444+ this . props
442445 if ( fontLigatures !== prevProps . fontLigatures ) {
443446 this . editor ?. updateOptions ( { fontLigatures } )
444447 }
@@ -454,6 +457,10 @@ export class CypherEditor extends React.Component<
454457 if ( enableMultiStatementMode !== prevProps . enableMultiStatementMode ) {
455458 this . onContentUpdate ( )
456459 }
460+
461+ if ( tabIndex !== prevProps . tabIndex ) {
462+ this . editor ?. updateOptions ( { tabIndex : this . props . tabIndex } )
463+ }
457464 }
458465
459466 componentWillUnmount = ( ) : void => {
0 commit comments