Fixes not showing advanced search when is in items page and click on advanced search button in header

This commit is contained in:
weryques 2018-07-09 10:20:22 -03:00
parent cd4a1caf53
commit 99cb251b8b
2 changed files with 16 additions and 11 deletions

View File

@ -83,12 +83,18 @@
},
methods: {
toItemsPage() {
this.$router.push({
path: '/items',
query: {
advancedSearch: true
}
});
if(this.$route.path == '/items') {
this.$root.$emit('openAdvancedSearch', true);
}
if(this.$route.path != '/items') {
this.$router.push({
path: '/items',
query: {
advancedSearch: true
}
});
}
},
updateSearch() {
if (this.$route.path != '/items') {

View File

@ -812,13 +812,12 @@
this.openAdvancedSearch = this.$route.query.advancedSearch;
}
this.$root.$on('openAdvancedSearch', (openAdvancedSearch) => {
this.openAdvancedSearch = openAdvancedSearch;
});
},
mounted() {
if(this.$route.query && this.$route.query.advancedSearch) {
this.openAdvancedSearch = this.$route.query.advancedSearch;
}
this.prepareMetadataAndFilters();
this.localTableMetadata = JSON.parse(JSON.stringify(this.tableMetadata));