Skip to content

Commit

Permalink
fix: update filter logic to fix capture collection filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
annavik committed Dec 20, 2024
1 parent 894eb4d commit 4ea7973
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/data-services/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export interface FetchParams {
projectId?: string
pagination?: { page: number; perPage: number }
sort?: { field: string; order: 'asc' | 'desc' }
filters?: { field: string; value?: string; isValid?: boolean }[]
filters?: { field: string; value?: string; error?: string }[]
}

export interface APIValidationError {
Expand Down
2 changes: 1 addition & 1 deletion ui/src/data-services/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const getFetchUrl = ({
}
if (params?.filters?.length) {
params.filters.forEach((filter) => {
if (filter.value?.length && filter.isValid) {
if (filter.value?.length && !filter.error) {
queryParams[filter.field] = filter.value
}
})
Expand Down

0 comments on commit 4ea7973

Please sign in to comment.