mirror of
				https://github.com/bastienwirtz/homer.git
				synced 2025-10-31 10:25:49 +01:00 
			
		
		
		
	Fix #171: empty search opens first item
This commit is contained in:
		| @@ -6,8 +6,8 @@ | ||||
|       ref="search" | ||||
|       :value="value" | ||||
|       @input="search($event.target.value)" | ||||
|       @keyup.enter.exact="$emit('search-open')" | ||||
|       @keyup.alt.enter="$emit('search-open', '_blank')" | ||||
|       @keyup.enter.exact="open()" | ||||
|       @keyup.alt.enter="open('_blank')" | ||||
|     /> | ||||
|   </div> | ||||
| </template> | ||||
| @@ -37,6 +37,12 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     open: function (target = null) { | ||||
|       if (!this.$refs.search.value) { | ||||
|         return; | ||||
|       } | ||||
|       this.$emit("search-open", target); | ||||
|     }, | ||||
|     focus: function () { | ||||
|       this.$emit("search-focus"); | ||||
|       this.$nextTick(() => { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user