diff options
author | nfebe <fenn25.fn@gmail.com> | 2025-01-27 20:06:09 +0100 |
---|---|---|
committer | F. E Noel Nfebe <fenn25.fn@gmail.com> | 2025-01-29 12:50:12 +0100 |
commit | a5307ac51288edf273723a3bf9415ab74abd1bac (patch) | |
tree | 2a666f05143f7ce62f3aa370008aee8bb085ed36 /core/src | |
parent | d3dc6beb00e685e0a3ef9a9a49a288d3ee0b17ba (diff) | |
download | nextcloud-server-a5307ac51288edf273723a3bf9415ab74abd1bac.tar.gz nextcloud-server-a5307ac51288edf273723a3bf9415ab74abd1bac.zip |
fix(unified-search): Prevent multiple file picker triggers in in-folder searchfix/load-more-than-5-items-in-folder-filter
Signed-off-by: nfebe <fenn25.fn@gmail.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/components/UnifiedSearch/UnifiedSearchModal.vue | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/components/UnifiedSearch/UnifiedSearchModal.vue b/core/src/components/UnifiedSearch/UnifiedSearchModal.vue index d75d54756ac..a2646780a13 100644 --- a/core/src/components/UnifiedSearch/UnifiedSearchModal.vue +++ b/core/src/components/UnifiedSearch/UnifiedSearchModal.vue @@ -511,7 +511,12 @@ export default defineComponent({ unifiedSearchLogger.debug('Applying provider filter', { providerFilter, loadMoreResultsForProvider }) if (!providerFilter.id) return if (providerFilter.isPluginFilter) { - providerFilter.callback() + // There is no way to know what should go into the callback currently + // Here we are passing isProviderFilterApplied (boolean) which is a flag sent to the plugin + // This is sent to the plugin so that depending on whether the filter is applied or not, the plugin can decide what to do + // TODO : In nextcloud/search, this should be a proper interface that the plugin can implement + const isProviderFilterApplied = this.filteredProviders.some(provider => provider.id === providerFilter.id) + providerFilter.callback(!isProviderFilterApplied) } this.providerResultLimit = loadMoreResultsForProvider ? this.providerResultLimit : 5 this.providerActionMenuIsOpen = false |