Skip to content

Instantly share code, notes, and snippets.

@sleepypioneer
Created August 9, 2018 13:58
Show Gist options
  • Save sleepypioneer/9f42785ca6b7cc5e8fb76f2aa2c89f4d to your computer and use it in GitHub Desktop.
Save sleepypioneer/9f42785ca6b7cc5e8fb76f2aa2c89f4d to your computer and use it in GitHub Desktop.
asyncFind(query) {
this.isLoading = true
this.usersOrGroups = []
// let response = OC.linkToOCS('cloud', 2) + 'groups?search=' + query
api.get(OC.linkToOCS('cloud', 2) + 'groups?search=' + query, 2).then(response => {
console.log(response) // eslint-disable-line
this.usersOrGroups.push(response)
this.isLoading = false
})
console.log(this.usersOrGroups) // eslint-disable-line
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment