mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-30 18:43:17 +00:00
Merge pull request #3482 from guemax/update-search-text-when-clicking-on-suggestion
fix: update text in search field when clicking on suggestion
This commit is contained in:
commit
693ac366e6
@ -1,7 +1,12 @@
|
||||
<template>
|
||||
<div class="suggestions-container absolute">
|
||||
<ul>
|
||||
<li v-for="(suggestion, i) in searchSuggestions" :key="i" @mouseover="onMouseOver(i)">
|
||||
<li
|
||||
v-for="(suggestion, i) in searchSuggestions"
|
||||
:key="i"
|
||||
@mouseover="onMouseOver(i)"
|
||||
@click="setSelected(i)"
|
||||
>
|
||||
<router-link
|
||||
class="suggestion"
|
||||
:class="{ 'suggestion-selected': selected === i }"
|
||||
@ -68,9 +73,6 @@ export default {
|
||||
this.selected = i;
|
||||
}
|
||||
},
|
||||
onClick(i) {
|
||||
this.setSelected(i);
|
||||
},
|
||||
setSelected(val) {
|
||||
this.selected = val;
|
||||
this.$emit("searchchange", this.searchSuggestions[this.selected]);
|
||||
|
Loading…
Reference in New Issue
Block a user