Tried to fix som thing with search
This commit is contained in:
@@ -12,6 +12,7 @@
|
|||||||
ref="inputField"
|
ref="inputField"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<button @click="clearSearch()">Clear</button>
|
||||||
</div>
|
</div>
|
||||||
<transition-group
|
<transition-group
|
||||||
tag="ul"
|
tag="ul"
|
||||||
@@ -50,6 +51,10 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
clearSearch() {
|
||||||
|
this.searchInputText = "";
|
||||||
|
this.searchGame();
|
||||||
|
},
|
||||||
searchGame() {
|
searchGame() {
|
||||||
this.showingGamesList = [];
|
this.showingGamesList = [];
|
||||||
for (const game of this.allGamesList) {
|
for (const game of this.allGamesList) {
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
alt="closeModalIMG"
|
alt="closeModalIMG"
|
||||||
@click="closeModal"
|
@click="closeModal"
|
||||||
/>
|
/>
|
||||||
<h1 v-if="showPeter()">Pete... I mean {{ playerName }} won!!</h1>
|
<h1>{{ playerName }} won!!</h1>
|
||||||
<h1 v-else>{{ playerName }} won!!</h1>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import arne from "../../arne.js";
|
import arne from "../../arne.js";
|
||||||
|
import InspirationWindow from "../items/InspirationWindow.vue";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -51,6 +52,7 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async randomizeTrack() {
|
async randomizeTrack() {
|
||||||
console.log("Randomizing track");
|
console.log("Randomizing track");
|
||||||
|
InspirationWindow.methods.clearSearch();
|
||||||
/* Prevents anyone from changing the winning score after the round has started */
|
/* Prevents anyone from changing the winning score after the round has started */
|
||||||
if (this.roundStarted === false) {
|
if (this.roundStarted === false) {
|
||||||
this.$store.dispatch("setRoundStarted", true);
|
this.$store.dispatch("setRoundStarted", true);
|
||||||
|
|||||||
Reference in New Issue
Block a user