Skip to content

Commit

Permalink
[Discover] Fix for other setting
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Oct 16, 2023
1 parent 05536b6 commit fd2c19d
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -25,13 +25,13 @@ export function getDataViewAppState(
sortDirection: string = 'desc',
query?: Query | AggregateQuery
) {
const currentColumnsRefreshed = uniq([...currentColumns, ...defaultColumns]);
let columns = currentColumns || [];

const nextColumns = modifyColumns
? currentColumnsRefreshed.filter((column) => nextDataView.fields.getByName(column))
: currentColumnsRefreshed;
if (modifyColumns) {
const currentColumnsRefreshed = uniq([...columns, ...defaultColumns]);
columns = currentColumnsRefreshed.filter((column) => nextDataView.fields.getByName(column));
}

let columns = nextColumns.length ? nextColumns : [];
if (query && isOfAggregateQueryType(query)) {
columns = [];
}
Expand Down

0 comments on commit fd2c19d

Please sign in to comment.