Skip to content

Commit

Permalink
Fix state management in collections
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten committed Sep 28, 2018
1 parent 73085c6 commit 83e0218
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/routes/settings/fields.vue
Expand Up @@ -52,7 +52,7 @@
<v-form
v-if="fields"
:fields="directusFields"
:values="collectionInfo"
:values="values"
collection="directus_collections"
@stage-value="stageValue" />

Expand Down Expand Up @@ -166,16 +166,19 @@ export default {
];
},
collectionInfo() {
return {
...this.$store.state.collections[this.collection],
...this.edits
};
return this.$store.state.collections[this.collection];
},
fieldsWithSort() {
return this.fields.map((field, index) => ({
...field,
sort: index + 1
}));
},
values() {
return {
...this.collectionInfo,
...this.edits
};
}
},
methods: {
Expand Down

0 comments on commit 83e0218

Please sign in to comment.