filter out saved queries without rowCalls

This commit is contained in:
Stephanie Yang 2021-05-25 14:08:39 -05:00
parent 29002b3f62
commit c1915ff361

View file

@ -104,10 +104,13 @@ export const QueryBuilder: FC<QueryBuilderProps> = ({
useEffect(() => {
setGroupByFilters(
queriesList.filter(
(q) => q.table === selectedTable.name && q.operation === 'Extract'
(q) =>
q.table === selectedTable.name &&
q.operation === 'Extract' &&
q.rowCalls.length > 0
)
);
}, [selectedTable]);
}, [selectedTable, queriesList]);
const getColumnsToShow = (cols?: { name: string; show: boolean }[]) => {
let columns: string[] = [];