Fixed an issue with clearing forms not correctly unsetting a value

This commit is contained in:
Thaum Rystra
2020-04-26 11:37:51 +02:00
parent 13cb9253c3
commit a2bae8d12a
6 changed files with 32 additions and 17 deletions

View File

@@ -109,7 +109,7 @@
:error-messages="errors.reset"
:menu-props="{auto: true, lazy: true}"
:debounce-time="debounceTime"
@change="(value, ack) => $emit('change', {path: ['reset'], value: value || '', ack})"
@change="(value, ack) => $emit('change', {path: ['reset'], value, ack})"
/>
</form-section>
</form-sections>

View File

@@ -86,7 +86,7 @@
:error-messages="errors.reset"
:menu-props="{auto: true, lazy: true}"
:debounce-time="debounceTime"
@change="(value, ack) => $emit('change', {path: ['reset'], value: value || '', ack})"
@change="(value, ack) => $emit('change', {path: ['reset'], value: value, ack})"
/>
</div>
</form-section>

View File

@@ -61,10 +61,9 @@
<proficiency-select
style="flex-basis: 300px;"
label="Base Proficiency"
clearable
:value="model.baseProficiency"
:error-messages="errors.baseProficiency"
@change="(value, ack) => {$emit('change', {path: ['baseProficiency'], value: value || '', ack}); log({value, ack})}"
@change="(value, ack) => {$emit('change', {path: ['baseProficiency'], value, ack})}"
/>
</div>
</form-section>
@@ -120,9 +119,6 @@
},
]
};},
methods: {
log: console.log,
},
};
</script>

View File

@@ -1,6 +1,7 @@
<template lang="html">
<smart-select
append-icon="arrow_drop_down"
clearable
class="ml-3"
v-bind="$attrs"
:menu-props="{transition: 'slide-y-transition', lazy: true}"
@@ -36,7 +37,7 @@
props: {
value: {
type: Number,
default: 1,
default: undefined,
},
},
data(){ return {