mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-11-26 07:27:22 +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>
|
<template>
|
||||||
<div class="suggestions-container absolute">
|
<div class="suggestions-container absolute">
|
||||||
<ul>
|
<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
|
<router-link
|
||||||
class="suggestion"
|
class="suggestion"
|
||||||
:class="{ 'suggestion-selected': selected === i }"
|
:class="{ 'suggestion-selected': selected === i }"
|
||||||
@ -68,9 +73,6 @@ export default {
|
|||||||
this.selected = i;
|
this.selected = i;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onClick(i) {
|
|
||||||
this.setSelected(i);
|
|
||||||
},
|
|
||||||
setSelected(val) {
|
setSelected(val) {
|
||||||
this.selected = val;
|
this.selected = val;
|
||||||
this.$emit("searchchange", this.searchSuggestions[this.selected]);
|
this.$emit("searchchange", this.searchSuggestions[this.selected]);
|
||||||
|
Loading…
Reference in New Issue
Block a user