Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.
TypeScript agentaiai-agentsall-in-onecrmcrm-systememaillinearmcpmessagingnotesnotionofficerustslackslack-alternativestartupstartup-toolstypescriptworkspace
fix(search): clear filters properly (#2461)
gbirman0499311438ef
diff --git a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsxindex 91fd40be39..f92fcfc586 100644--- a/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx+++ b/js/app/packages/app/component/next-soup/soup-view/filters-bar/search-filter-controls.tsx@@ -61,7 +61,7 @@ const INDEX_SELECT_OPTIONS: Option[] = INDEX_OPTIONS.map((o) => ({}));export const SearchIndexFilter = () => {- const { soup, queryFilters, setQueryFilters } = useSoupView();+ const { soup, setQueryFilters } = useSoupView();const activeIndex = createMemo((): Option[] => {const found = INDEX_OPTIONS.find((opt) => soup.filters.isActive(opt.value));@@ -78,30 +78,17 @@ export const SearchIndexFilter = () => {}}- const prevChannelFilters = queryFilters().channel_filters;- const channelSubFilters = {- channel_ids: prevChannelFilters?.channel_ids,- sender_ids: prevChannelFilters?.sender_ids,- };-if (selected.length > 0) {const opt = INDEX_OPTIONS.find((o) => o.value === selected[0].value);if (opt) {soup.filters.toggle({ or: [opt.value as FilterID] });setQueryFilters({...opt.queryFilters,- channel_filters: {- ...opt.queryFilters.channel_filters,- ...channelSubFilters,- },});}} else {setQueryFilters({...QUERY_FILTERS.default,- channel_filters: {- ...channelSubFilters,- },});}});