Skip to content

Commit

Permalink
Merge pull request #24 from Ebubeker/indicators
Browse files Browse the repository at this point in the history
fix: build error
  • Loading branch information
majkshkurti authored Jan 8, 2024
2 parents dc8c1f2 + b378213 commit 1510653
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion apps/web/components/map/panels/filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const FilterPanel = (props: FilterProps) => {
);
setExpressions(existingExpressions);
} else {
const query = createTheCQLBasedOnExpression(expressions, logicalOperator, layerAttributes);
const query = createTheCQLBasedOnExpression(expressions, layerAttributes, logicalOperator);
setLogicalOperator("op" in query ? (query.op as "and" | "or") : "and");

const updatedProjectLayer = {
Expand All @@ -129,6 +129,7 @@ const FilterPanel = (props: FilterProps) => {
setTimeout(() => {
mutate();
}, 300);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [expressions, logicalOperator]);

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/web/lib/utils/filtering/filtering_cql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ export function or_operator(args: string[]) {

export function createTheCQLBasedOnExpression(
expressions,
layerAttributes: {keys: {name: string, type: string}[]},
logicalOperator?: "and" | "or",
layerAttributes: {keys: {name: string, label}[]},
) {
const queries = expressions
.filter((exp) => exp.value && exp.expression && exp.attribute)
Expand Down

0 comments on commit 1510653

Please sign in to comment.