diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-17 13:55:53 +0200 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2024-05-23 07:19:06 +0200 |
commit | dfd0fa673dc956450c7c9a8e117f0be4aace07ff (patch) | |
tree | 32d5f79dc257dbc1edf2e2af96828244b84eaef5 /apps/files | |
parent | 42001984f345bdfcebc229ef06c9f9158df9a862 (diff) | |
download | nextcloud-server-dfd0fa673dc956450c7c9a8e117f0be4aace07ff.tar.gz nextcloud-server-dfd0fa673dc956450c7c9a8e117f0be4aace07ff.zip |
fix(files): Debounce does not return a function so it should be used as computed
This also fixes hacky solution to `this` access
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/src/views/FilesList.vue | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/apps/files/src/views/FilesList.vue b/apps/files/src/views/FilesList.vue index 8bbe6cef1bf..9fe8207615f 100644 --- a/apps/files/src/views/FilesList.vue +++ b/apps/files/src/views/FilesList.vue @@ -223,6 +223,16 @@ export default defineComponent({ }, computed: { + /** + * Handle search event from unified search. + */ + onSearch() { + return debounce((searchEvent: { query: string }) => { + console.debug('Files app handling search event from unified search...', searchEvent) + this.filterText = searchEvent.query + }, 500) + }, + userConfig(): UserConfig { return this.userConfigStore.userConfig }, @@ -613,15 +623,6 @@ export default defineComponent({ this.fetchContent() } }, - /** - * Handle search event from unified search. - * - * @param searchEvent is event object. - */ - onSearch: debounce(function(searchEvent) { - console.debug('Files app handling search event from unified search...', searchEvent) - this.filterText = searchEvent.query - }, 500), /** * Reset the search query |