Skip to content

Commit e0a271e

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 1499c8c commit e0a271e

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>
@@ -525,10 +525,6 @@ export default defineComponent({
525525
this.filters[existingPersonFilter].name = person.displayName
526526
}
527527
528-
this.providers.forEach(async (provider, index) => {
529-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['person']))
530-
})
531-
532528
this.debouncedFind(this.searchQuery)
533529
unifiedSearchLogger.debug('Person filter applied', { person })
534530
},
@@ -582,7 +578,6 @@ export default defineComponent({
582578
for (let i = 0; i < this.filters.length; i++) {
583579
if (this.filters[i].id === filter.id) {
584580
this.filters.splice(i, 1)
585-
this.enableAllProviders()
586581
break
587582
}
588583
}
@@ -621,9 +616,6 @@ export default defineComponent({
621616
this.filters.push(this.dateFilter)
622617
}
623618
624-
this.providers.forEach(async (provider, index) => {
625-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['since', 'until']))
626-
})
627619
this.debouncedFind(this.searchQuery)
628620
},
629621
applyQuickDateRange(range) {

0 commit comments

Comments
 (0)