Commit 1fc32a09 authored by Johan Vervloet's avatar Johan Vervloet

Fix behaviour of player select components, #116.

Closes #116
parent 05512918
......@@ -5,6 +5,7 @@
### Changed
- Only show the correction line interface if there's enough players to play, #115.
- Properly reset player select components after logging a game, #116.
## [0.2.1] - 2020-01-24
......
......@@ -3,7 +3,6 @@
<select v-model="selectedPlayer"
:name="name"
:value="value"
@change="$emit('input', selectedPlayer)"
>
<option value="">{{$t("choose")}}</option>
<option
......@@ -31,10 +30,16 @@ export default {
required: true
}
},
data() {
return {
selectedPlayer: ''
}
computed: {
// stack overflow ftw https://stackoverflow.com/questions/47311936/v-model-and-child-components
selectedPlayer: {
get() {
return this.value;
},
set(val) {
this.$emit('input', val);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment