diff --git a/src/components/advancedSearch/TextMode.vue b/src/components/advancedSearch/TextMode.vue index 11dc3a5c..50cc0242 100644 --- a/src/components/advancedSearch/TextMode.vue +++ b/src/components/advancedSearch/TextMode.vue @@ -205,8 +205,9 @@ export default { this.$emit('search', { q: '', str: '', metaList: [] }) } }, - focus () { - this.codeMirror.focus() + focus (e) { + toRaw(this.codeMirror).setValue(e.str) + // this.codeMirror.focus() }, changeMode () { const str = this.codeMirror.getValue().trim() diff --git a/src/views/detections/DetectionSearch.vue b/src/views/detections/DetectionSearch.vue index 56c27b0f..4267425f 100644 --- a/src/views/detections/DetectionSearch.vue +++ b/src/views/detections/DetectionSearch.vue @@ -191,7 +191,7 @@ export default { this.showHistory = false this.$nextTick(() => { if (this.$refs.search.$refs.textMode) { - this.$refs.search.$refs.textMode.focus() + this.$refs.search.$refs.textMode.focus(row) } }) if (this.showList) { diff --git a/src/views/entityExplorer/search/ExplorerSearch.vue b/src/views/entityExplorer/search/ExplorerSearch.vue index 2a0dba57..dfa59da8 100644 --- a/src/views/entityExplorer/search/ExplorerSearch.vue +++ b/src/views/entityExplorer/search/ExplorerSearch.vue @@ -130,7 +130,7 @@ export default { this.showHistory = false this.$nextTick(() => { if (this.$refs.search.$refs.textMode) { - this.$refs.search.$refs.textMode.focus() + this.$refs.search.$refs.textMode.focus(row) } }) if (this.showList) {