fix(editor-ui): Disable editing in Function nodes in executions view (#4041)

🐛 Disable editing in Function nodes in executions view
This commit is contained in:
Iván Ovejero 2022-09-07 09:18:18 +02:00 committed by GitHub
parent e565b87cf8
commit 772836abc7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View file

@ -8,7 +8,7 @@
:before-close="closeDialog" :before-close="closeDialog"
> >
<div class="text-editor-wrapper ignore-key-press"> <div class="text-editor-wrapper ignore-key-press">
<code-editor :value="value" :autocomplete="loadAutocompleteData" @input="$emit('valueChanged', $event)" /> <code-editor :value="value" :autocomplete="loadAutocompleteData" :readonly="readonly" @input="$emit('valueChanged', $event)" />
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
@ -41,7 +41,7 @@ export default mixins(
components: { components: {
CodeEditor, CodeEditor,
}, },
props: ['codeAutocomplete', 'parameter', 'path', 'type', 'value'], props: ['codeAutocomplete', 'parameter', 'path', 'type', 'value', 'readonly'],
methods: { methods: {
loadAutocompleteData(): string[] { loadAutocompleteData(): string[] {
if (['function', 'functionItem'].includes(this.codeAutocomplete)) { if (['function', 'functionItem'].includes(this.codeAutocomplete)) {

View file

@ -37,6 +37,7 @@
:type="editorType" :type="editorType"
:codeAutocomplete="codeAutocomplete" :codeAutocomplete="codeAutocomplete"
:path="path" :path="path"
:readonly="isReadOnly"
@closeDialog="closeCodeEditDialog" @closeDialog="closeCodeEditDialog"
@valueChanged="expressionUpdated" @valueChanged="expressionUpdated"
></code-edit> ></code-edit>