Tried to fix som thing with search

This commit is contained in:
2023-08-19 12:24:10 +02:00
parent aae8de8fe9
commit b6f94794fe
3 changed files with 8 additions and 2 deletions

View File

@@ -12,6 +12,7 @@
ref="inputField"
/>
</div>
<button @click="clearSearch()">Clear</button>
</div>
<transition-group
tag="ul"
@@ -50,6 +51,10 @@ export default {
}
},
methods: {
clearSearch() {
this.searchInputText = "";
this.searchGame();
},
searchGame() {
this.showingGamesList = [];
for (const game of this.allGamesList) {

View File

@@ -9,8 +9,7 @@
alt="closeModalIMG"
@click="closeModal"
/>
<h1 v-if="showPeter()">Pete... I mean {{ playerName }} won!!</h1>
<h1 v-else>{{ playerName }} won!!</h1>
<h1>{{ playerName }} won!!</h1>
</div>
</div>
</div>

View File

@@ -29,6 +29,7 @@
<script>
import { mapState } from "vuex";
import arne from "../../arne.js";
import InspirationWindow from "../items/InspirationWindow.vue";
export default {
data() {
return {
@@ -51,6 +52,7 @@ export default {
methods: {
async randomizeTrack() {
console.log("Randomizing track");
InspirationWindow.methods.clearSearch();
/* Prevents anyone from changing the winning score after the round has started */
if (this.roundStarted === false) {
this.$store.dispatch("setRoundStarted", true);