fix(frontend): found the root cause of the user search not returning values

This commit is contained in:
Gergő Jedlicska
2022-03-24 18:06:46 +01:00
parent 49fdc1ff40
commit 7086749c26
@@ -255,6 +255,9 @@ export default {
},
debounce: 300,
// if the same query is input after adding a contributor, it doesn't show the proper results with caching
// the cause was the error on the filtered search results prop breaking
// but it still can be reasonable to disable this query caching for any user permission changes
// happening while the cache is still active
fetchPolicy: 'no-cache'
},
serverInfo: {
@@ -343,7 +346,11 @@ export default {
async addCollab(user) {
this.loading = true
this.search = null
this.userSearch.items = null
// the line below is meant to disable the apollo cache? if so, its not doing that
// rather it breaks the filteredSearchResults computed property
// which in turn fails silently, without any errors, just not having values
// TODO: check with Dim
// this.userSearch.items = null
user.role = 'stream:contributor'
await this.grantPermissionUser(user)
this.stream.collaborators.unshift(user)