Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Do not query on empty search string
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Mar 28, 2019
commit 5be0d217bb0442cbf947a7901fe652376f6f2d7f
12 changes: 9 additions & 3 deletions src/components/CollectionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,18 +118,24 @@ import CollectionListItem from '../components/CollectionListItem'
import { CollectionStoreModule } from '../collectionstore'
import Avatar from 'nextcloud-vue/dist/Components/Avatar'
import Multiselect from 'nextcloud-vue/dist/Components/Multiselect'
import { setTimeout } from 'timers';
Vue.use(Vuex)

const store = new Vuex.Store(CollectionStoreModule)

const METHOD_CREATE_COLLECTION = 0
const METHOD_ADD_TO_COLLECTION = 1
const METHOD_HINT = 2

const _debouncedSearch = debounce(
function(query) {
this.$store.dispatch('search', query).then((collections) => {
this.searchCollections = collections
})
if (query !== '') {
this.$store.dispatch('search', query).then((collections) => {
this.searchCollections = collections
}).catch(e => {
OC.Notification.showTemporary(e)
})
}
},
500, {}
)
Expand Down