Skip to content

Commit

Permalink
Merge pull request #59 from Nickz22/fix/onboard-add-filter-logic-value
Browse files Browse the repository at this point in the history
add default value for filter logic on onboard section
  • Loading branch information
Nickz22 authored Oct 2, 2024
2 parents def1d3b + f62113b commit e34c4e4
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions client/src/components/FilterContainer/useFilterLogic.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,8 @@ export const useFilterLogic = (initialFilterContainer, initialFilterFields) => {
...prevContainer.filters,
{ field: "", operator: "", value: "", dataType: "string" },
],
filterLogic: prevContainer.filters.length === 0 ? "1" : `${prevContainer.filterLogic} AND ${prevContainer.filters.length + 1}`
}));

setLogicErrors(
/**
* @param {{[key: number]: any}} currentErrors
*/
(currentErrors) => ({
...currentErrors,
0: "Please add new logic for the new filter.",
})
);
}, []);

const handleDeleteFilter = useCallback(
Expand Down

0 comments on commit e34c4e4

Please sign in to comment.