Don't reload the tasks when opening/closing the popup
This commit is contained in:
parent
026a12009c
commit
f7ed457500
|
@ -12,6 +12,8 @@ export default {
|
|||
pages: [],
|
||||
currentPage: 0,
|
||||
|
||||
loadedList: null,
|
||||
|
||||
showTaskSearch: false,
|
||||
searchTerm: '',
|
||||
|
||||
|
@ -53,6 +55,17 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
const list = {listId: parseInt(this.$route.params.listId)}
|
||||
|
||||
const currentList = {
|
||||
id: list.listId,
|
||||
params: params,
|
||||
search: search,
|
||||
}
|
||||
if (JSON.stringify(currentList) === JSON.stringify(this.loadedList)) {
|
||||
return
|
||||
}
|
||||
|
||||
this.$set(this, 'tasks', [])
|
||||
|
||||
if (params === null) {
|
||||
|
@ -62,7 +75,8 @@ export default {
|
|||
if (search !== '') {
|
||||
params.s = search
|
||||
}
|
||||
this.taskCollectionService.getAll({listId: this.$route.params.listId}, params, page)
|
||||
|
||||
this.taskCollectionService.getAll(list, params, page)
|
||||
.then(r => {
|
||||
this.$set(this, 'tasks', r)
|
||||
this.$set(this, 'pages', [])
|
||||
|
@ -95,6 +109,8 @@ export default {
|
|||
isEllipsis: false,
|
||||
})
|
||||
}
|
||||
|
||||
this.loadedList = currentList
|
||||
})
|
||||
.catch(e => {
|
||||
this.error(e, this)
|
||||
|
|
|
@ -106,7 +106,7 @@ export const store = new Vuex.Store({
|
|||
// Server updates don't return the right. Therefore the right is reset after updating the list which is
|
||||
// confusing because all the buttons will disappear in that case. To prevent this, we're keeping the right
|
||||
// when updating the list in global state.
|
||||
if(typeof state.currentList.maxRight !== 'undefined') {
|
||||
if (typeof state.currentList.maxRight !== 'undefined') {
|
||||
currentList.maxRight = state.currentList.maxRight
|
||||
}
|
||||
state.currentList = currentList
|
||||
|
|
|
@ -86,6 +86,10 @@ export default {
|
|||
return
|
||||
},
|
||||
loadList() {
|
||||
if(this.$route.name.includes('.settings.')) {
|
||||
return
|
||||
}
|
||||
|
||||
this.setTitle(this.currentList.title)
|
||||
|
||||
// This invalidates the loaded list at the kanban board which lets it reload its content when
|
||||
|
|
Reference in New Issue