views: fix jerky refresh behaviour in list view

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2019-12-12 06:24:39 +05:30
parent c5611be865
commit b638923214
1 changed files with 4 additions and 2 deletions

View File

@ -313,7 +313,10 @@ export default {
},
methods: {
fetchData () {
this.routeName = this.$route.name
if (this.routeName !== this.$route.name) {
this.routeName = this.$route.name
this.items = []
}
if (!this.routeName) {
this.routeName = this.$route.matched[this.$route.matched.length - 1].parent.name
}
@ -321,7 +324,6 @@ export default {
this.actions = []
this.columns = []
this.columnKeys = []
this.items = []
this.treeData = []
this.treeSelected = {}
var params = { listall: true }