Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Commit

Permalink
refactor: tick calculation (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
simcha90 authored Apr 26, 2021
1 parent 158a777 commit ed727cb
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions plugins/plugin-chart-table/src/buildQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,11 @@ const buildQuery: BuildQuery<TableChartFormData> = (formData: TableChartFormData
});
}

const interactiveGroupBy = formData.extra_form_data?.interactive_groupby;
if (interactiveGroupBy && queryObject.columns && queryMode === QueryMode.aggregate) {
queryObject.columns = [...new Set([...queryObject.columns, ...interactiveGroupBy])];
}

if (formData.server_pagination) {
return [
{ ...queryObject },
Expand All @@ -134,11 +139,6 @@ const buildQuery: BuildQuery<TableChartFormData> = (formData: TableChartFormData
];
}

const interactiveGroupBy = formData.extra_form_data?.interactive_groupby;
if (interactiveGroupBy && queryObject.columns) {
queryObject.columns = [...new Set([...queryObject.columns, ...interactiveGroupBy])];
}

return [queryObject, ...extraQueries];
});
};
Expand Down

1 comment on commit ed727cb

@vercel
Copy link

@vercel vercel bot commented on ed727cb Apr 26, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.