Removed unnecessary lang parameter for GQL Query Editor

This commit is contained in:
Andrew Bastin
2020-05-02 15:41:34 -04:00
parent db2429d1cb
commit 7b52637c5f

View File

@@ -41,10 +41,6 @@ export default {
type: String, type: String,
required: false, required: false,
}, },
lang: {
type: String,
default: "gql-query",
},
onRunGQLQuery: { onRunGQLQuery: {
type: Function, type: Function,
default: () => {}, default: () => {},
@@ -79,9 +75,6 @@ export default {
}) })
}) })
}, },
lang(value) {
this.editor.getSession().setMode(`ace/mode/${value}`)
},
options(value) { options(value) {
this.editor.setOptions(value) this.editor.setOptions(value)
}, },
@@ -93,7 +86,7 @@ export default {
let langTools = ace.require("ace/ext/language_tools") let langTools = ace.require("ace/ext/language_tools")
const editor = ace.edit(this.$refs.editor, { const editor = ace.edit(this.$refs.editor, {
mode: `ace/mode/${this.lang}`, mode: `ace/mode/gql-query`,
enableBasicAutocompletion: true, enableBasicAutocompletion: true,
enableLiveAutocompletion: true, enableLiveAutocompletion: true,
...this.options, ...this.options,