diff --git a/src/neo4j-arc/cypher-language-support/cypher-editor/CypherEditor.tsx b/src/neo4j-arc/cypher-language-support/cypher-editor/CypherEditor.tsx index e1501cf06b0..9ef13615f50 100644 --- a/src/neo4j-arc/cypher-language-support/cypher-editor/CypherEditor.tsx +++ b/src/neo4j-arc/cypher-language-support/cypher-editor/CypherEditor.tsx @@ -65,6 +65,7 @@ type CypherEditorDefaultProps = { additionalCommands: Partial< Record > + tabIndex?: number useDb: null | string value: string } @@ -347,7 +348,8 @@ export class CypherEditor extends React.Component< selectionHighlight: false, value: this.props.value, wordWrap: 'on', - wrappingStrategy: 'advanced' + wrappingStrategy: 'advanced', + tabIndex: this.props.tabIndex }) const { KeyCode, KeyMod } = monaco @@ -438,7 +440,8 @@ export class CypherEditor extends React.Component< } componentDidUpdate(prevProps: CypherEditorProps): void { - const { useDb, fontLigatures, enableMultiStatementMode } = this.props + const { useDb, fontLigatures, enableMultiStatementMode, tabIndex } = + this.props if (fontLigatures !== prevProps.fontLigatures) { this.editor?.updateOptions({ fontLigatures }) } @@ -454,6 +457,10 @@ export class CypherEditor extends React.Component< if (enableMultiStatementMode !== prevProps.enableMultiStatementMode) { this.onContentUpdate() } + + if (tabIndex !== prevProps.tabIndex) { + this.editor?.updateOptions({ tabIndex: this.props.tabIndex }) + } } componentWillUnmount = (): void => { diff --git a/src/neo4j-arc/package.json b/src/neo4j-arc/package.json index 5e078c1235e..f6d48f0a290 100644 --- a/src/neo4j-arc/package.json +++ b/src/neo4j-arc/package.json @@ -1,6 +1,6 @@ { "name": "@neo4j-devtools/arc", - "version": "0.0.38", + "version": "0.0.39", "main": "dist/neo4j-arc.js", "author": "Neo4j Inc.", "license": "GPL-3.0",