Skip to content

Commit 65ef696

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 e0e80c8 commit 65ef696

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>
@@ -553,10 +553,6 @@ export default defineComponent({
553553
this.filters[existingPersonFilter].name = person.displayName
554554
}
555555
556-
this.providers.forEach(async (provider, index) => {
557-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['person']))
558-
})
559-
560556
this.debouncedFind(this.searchQuery)
561557
unifiedSearchLogger.debug('Person filter applied', { person })
562558
},
@@ -610,7 +606,6 @@ export default defineComponent({
610606
for (let i = 0; i < this.filters.length; i++) {
611607
if (this.filters[i].id === filter.id) {
612608
this.filters.splice(i, 1)
613-
this.enableAllProviders()
614609
break
615610
}
616611
}
@@ -649,9 +644,6 @@ export default defineComponent({
649644
this.filters.push(this.dateFilter)
650645
}
651646
652-
this.providers.forEach(async (provider, index) => {
653-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['since', 'until']))
654-
})
655647
this.debouncedFind(this.searchQuery)
656648
},
657649
applyQuickDateRange(range) {

0 commit comments

Comments
 (0)