Skip to content

Commit 9fa5e6c

Browse files
committed
fix(unified-search): prevent provider disabling on content filter apply
When date range or person filters were applied, providers that didn't support these filters were automatically disabled in the UI. This made the in-folder filter appear auto-applied and prevented users from searching non-compatible providers. Remove automatic provider disabling logic from updateDateFilter(), applyPersonFilter(), and removeFilter(). Content filters now apply only to compatible providers via existing compatibility checks while keeping all providers available for selection. Signed-off-by: nfebe <[email protected]>
1 parent 3f2e420 commit 9fa5e6c

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

core/src/components/UnifiedSearch/UnifiedSearchModal.vue

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
:label="t('core', 'Search apps, files, tags, messages') + '...'"
2828
@update:value="debouncedFind" />
2929
<div class="unified-search-modal__filters" data-cy-unified-search-filters>
30-
<NcActions :menu-name="t('core', 'Places')" :open.sync="providerActionMenuIsOpen" data-cy-unified-search-filter="places">
30+
<NcActions v-model:open="providerActionMenuIsOpen" :menu-name="t('core', 'Places')" data-cy-unified-search-filter="places">
3131
<template #icon>
3232
<IconListBox :size="20" />
3333
</template>
@@ -43,7 +43,7 @@
4343
{{ provider.name }}
4444
</NcActionButton>
4545
</NcActions>
46-
<NcActions :menu-name="t('core', 'Date')" :open.sync="dateActionMenuIsOpen" data-cy-unified-search-filter="date">
46+
<NcActions v-model:open="dateActionMenuIsOpen" :menu-name="t('core', 'Date')" data-cy-unified-search-filter="date">
4747
<template #icon>
4848
<IconCalendarRange :size="20" />
4949
</template>
@@ -506,10 +506,6 @@ export default defineComponent({
506506
this.filters[existingPersonFilter].name = person.displayName
507507
}
508508
509-
this.providers.forEach(async (provider, index) => {
510-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['person']))
511-
})
512-
513509
this.debouncedFind(this.searchQuery)
514510
unifiedSearchLogger.debug('Person filter applied', { person })
515511
},
@@ -563,7 +559,6 @@ export default defineComponent({
563559
for (let i = 0; i < this.filters.length; i++) {
564560
if (this.filters[i].id === filter.id) {
565561
this.filters.splice(i, 1)
566-
this.enableAllProviders()
567562
break
568563
}
569564
}
@@ -602,9 +597,6 @@ export default defineComponent({
602597
this.filters.push(this.dateFilter)
603598
}
604599
605-
this.providers.forEach(async (provider, index) => {
606-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['since', 'until']))
607-
})
608600
this.debouncedFind(this.searchQuery)
609601
},
610602
applyQuickDateRange(range) {

0 commit comments

Comments
 (0)