Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ type CypherEditorDefaultProps = {
additionalCommands: Partial<
Record<monaco.KeyCode, monaco.editor.ICommandHandler>
>
tabIndex?: number
useDb: null | string
value: string
}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 })
}
Expand All @@ -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 => {
Expand Down
2 changes: 1 addition & 1 deletion src/neo4j-arc/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down