blob: bf554bdadef56cbc1f773f95468802b382c8d117 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<template>
<div>
<label for="call-sign">Filter by special callsign: </label>
<select id="call-sign" v-model="selected">
<option value="all">All</option>
<option v-for="option in options" :key="option.id" :value="option.sign" v-text="option.sign"></option>
</select>
</div>
</template>
<script>
export default {
mounted() {
this.$store.dispatch('fillSigns');
},
computed: {
selected: {
get() {
return this.$store.getters.getSelectedSign;
},
set(value) {
this.$store.dispatch('setSelectedSign', value);
this.$emit('sign-changed');
}
},
options() {
return this.$store.getters.getSigns;
}
}
}
</script>
|