[NIFI-13780] fix jolt example input codemirror cursor issue (#9389)

This closes #9389
This commit is contained in:
Scott Aslan 2024-10-15 12:13:57 -06:00 committed by GitHub
parent 66d378c58b
commit 83a131f953
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -74,6 +74,18 @@ export class JoltTransformJsonUi implements OnDestroy {
private revision$ = this.store.selectSignal(selectRevisionFromRoute);
private clientId$ = this.store.selectSignal(selectClientIdFromRoute);
private disconnectedNodeAcknowledged$ = this.store.selectSignal(selectDisconnectedNodeAcknowledgedFromRoute);
private exampleDataOptions = {
theme: 'nifi',
lineNumbers: true,
gutters: ['CodeMirror-lint-markers'],
mode: 'application/json',
lint: false,
extraKeys: {
'Shift-Ctrl-F': () => {
this.formatInput();
}
}
};
protected readonly TextTip = TextTip;
@ -180,18 +192,7 @@ export class JoltTransformJsonUi implements OnDestroy {
}
getExampleDataOptions(): any {
return {
theme: 'nifi',
lineNumbers: true,
gutters: ['CodeMirror-lint-markers'],
mode: 'application/json',
lint: false,
extraKeys: {
'Shift-Ctrl-F': () => {
this.formatInput();
}
}
};
return this.exampleDataOptions;
}
getOutputOptions(): any {
@ -372,7 +373,7 @@ export class JoltTransformJsonUi implements OnDestroy {
});
this.editJoltTransformJSONProcessorForm.controls['input'].valueChanges.subscribe(() => {
codeEditor.codeMirror.setOption('lint', true);
this.exampleDataOptions.lint = true;
});
}