Fixes error of undefined object in filter lists. Prop was being passe before loading was finished.

This commit is contained in:
Mateus Machado Luna 2018-04-13 12:12:42 -03:00
parent cdbd16c42b
commit c37cffc8fa
2 changed files with 3 additions and 3 deletions

View File

@ -286,7 +286,7 @@ export default {
addFieldViaButton(fieldType, fieldIndex) {
this.availableFieldList.splice(fieldIndex, 1);
let lastIndex = this.activeFilterList.length;
// Updates store with temporary Filter
this.addTemporaryFilter(fieldType);
@ -429,7 +429,7 @@ export default {
this.isLoadingFilters = false;
// Needs to be done after activeFilterList exists to compare and remove chosen fields.
this.fetchFields({collectionId: this.collectionId, isRepositoryLevel: this.isRepositoryLevel, isContextEdit: true })
.then((fields) => {
.then(() => {
this.isLoadingFieldTypes = false;
this.updateListOfFields();
})

View File

@ -29,7 +29,7 @@
:active.sync="isLoadingFilters"/>
<h3>{{ $i18n.get('filters') }}</h3>
<filters-items-list
v-if="filters.length > 0"
v-if="!isLoadingFilters && filters.length > 0"
:filters="filters"/>
<section
v-else