Frontend remembers state.

This commit is contained in:
James Cole
2021-01-17 19:52:53 +01:00
parent c86791950d
commit 79c00548df
22 changed files with 239 additions and 258 deletions

View File

@@ -27,7 +27,7 @@
<input
type="text"
name="internal_reference[]"
v-model="internalReference"
v-model="value"
:placeholder="$t('firefly.internal_reference')"
class="form-control"/>
<div class="input-group-append">
@@ -43,7 +43,7 @@ import {createNamespacedHelpers} from "vuex";
const {mapState, mapGetters, mapActions, mapMutations} = createNamespacedHelpers('transactions/create')
export default {
props: ['index'],
props: ['index', 'value'],
name: "TransactionInternalReference",
methods: {
...mapMutations(
@@ -52,13 +52,8 @@ export default {
],
),
},
data() {
return {
internalReference: '',
}
},
watch: {
internalReference: function (value) {
value: function (value) {
this.updateField({field: 'internal_reference', index: this.index, value: value});
}
}