Commit db3266f7 authored by Simon Knox's avatar Simon Knox

fix default weight selection display

parent 20d43709
...@@ -51,14 +51,17 @@ export default { ...@@ -51,14 +51,17 @@ export default {
}, },
methods: { methods: {
selectWeight(weight) { selectWeight(weight) {
this.board.weight = this.weightInt(weight);
},
weightInt(weight) {
if (weight === ANY_WEIGHT) { if (weight === ANY_WEIGHT) {
weight = -1; return -1;
} }
if (weight === NO_WEIGHT) { if (weight === NO_WEIGHT) {
weight = 0; return 0;
} }
this.$set(this.board, 'weight', weight); return weight
}, }
}, },
mounted() { mounted() {
new WeightSelect(this.$refs.dropdownButton, { new WeightSelect(this.$refs.dropdownButton, {
...@@ -121,6 +124,7 @@ export default { ...@@ -121,6 +124,7 @@ export default {
:key="weight" :key="weight"
> >
<a <a
:class="{'is-active': weightInt(weight) == value}"
:data-id="weight" :data-id="weight"
href="#" href="#"
> >
......
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
clicked: function(glDropdownEvt) { clicked: function(glDropdownEvt) {
const e = glDropdownEvt.e; const e = glDropdownEvt.e;
let selected = glDropdownEvt.selectedObj; let selected = glDropdownEvt.selectedObj;
const inputField = $dropdown.closest('.selectbox').find(`input[name='${fieldName}']`);
if (options.handleClick) { if (options.handleClick) {
e.preventDefault(); e.preventDefault();
......
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