Skip to content

Commit cf0cc82

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 1158319 commit cf0cc82

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

core/src/components/UnifiedSearch/UnifiedSearchModal.vue

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@
2424
<div class="unified-search-modal__header">
2525
<NcInputField
2626
ref="searchInput"
27-
v-model="searchQuery"
27+
v-model:value="searchQuery"
2828
data-cy-unified-search-input
2929
type="text"
3030
:label="t('core', 'Search apps, files, tags, messages') + '...'"
3131
@update:value="debouncedFind" />
3232
<div class="unified-search-modal__filters" data-cy-unified-search-filters>
33-
<NcActions :menu-name="t('core', 'Places')" :open.sync="providerActionMenuIsOpen" data-cy-unified-search-filter="places">
33+
<NcActions v-model:open="providerActionMenuIsOpen" :menu-name="t('core', 'Places')" data-cy-unified-search-filter="places">
3434
<template #icon>
3535
<IconListBox :size="20" />
3636
</template>
@@ -47,7 +47,7 @@
4747
{{ provider.name }}
4848
</NcActionButton>
4949
</NcActions>
50-
<NcActions :menu-name="t('core', 'Date')" :open.sync="dateActionMenuIsOpen" data-cy-unified-search-filter="date">
50+
<NcActions v-model:open="dateActionMenuIsOpen" :menu-name="t('core', 'Date')" data-cy-unified-search-filter="date">
5151
<template #icon>
5252
<IconCalendarRange :size="20" />
5353
</template>
@@ -567,10 +567,6 @@ export default defineComponent({
567567
this.filters[existingPersonFilter].name = person.displayName
568568
}
569569
570-
this.providers.forEach(async (provider, index) => {
571-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['person']))
572-
})
573-
574570
this.debouncedFind(this.searchQuery)
575571
unifiedSearchLogger.debug('Person filter applied', { person })
576572
},
@@ -628,7 +624,6 @@ export default defineComponent({
628624
for (let i = 0; i < this.filters.length; i++) {
629625
if (this.filters[i].id === filter.id) {
630626
this.filters.splice(i, 1)
631-
this.enableAllProviders()
632627
break
633628
}
634629
}
@@ -669,9 +664,6 @@ export default defineComponent({
669664
this.filters.push(this.dateFilter)
670665
}
671666
672-
this.providers.forEach(async (provider, index) => {
673-
this.providers[index].disabled = !(await this.providerIsCompatibleWithFilters(provider, ['since', 'until']))
674-
})
675667
this.debouncedFind(this.searchQuery)
676668
},
677669

0 commit comments

Comments
 (0)