Commit db3266f7 authored by Simon Knox's avatar Simon Knox

fix default weight selection display

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