Enrich filters with all types (#2653)
This commit is contained in:
@ -166,7 +166,7 @@ export const useViewFilters = (viewScopeId: string) => {
|
||||
filter.fieldMetadataId === filterToUpsert.fieldMetadataId,
|
||||
);
|
||||
|
||||
if (existingFilterIndex === -1) {
|
||||
if (existingFilterIndex === -1 && filterToUpsert.value !== '') {
|
||||
filtersDraft.push({
|
||||
...filterToUpsert,
|
||||
id: existingSavedFilterId,
|
||||
@ -174,6 +174,11 @@ export const useViewFilters = (viewScopeId: string) => {
|
||||
return filtersDraft;
|
||||
}
|
||||
|
||||
if (filterToUpsert.value === '') {
|
||||
filtersDraft.splice(existingFilterIndex, 1);
|
||||
return filtersDraft;
|
||||
}
|
||||
|
||||
filtersDraft[existingFilterIndex] = {
|
||||
...filterToUpsert,
|
||||
id: existingSavedFilterId,
|
||||
|
||||
Reference in New Issue
Block a user