Skip to content

Commit

Permalink
UIPQB-74: update test
Browse files Browse the repository at this point in the history
  • Loading branch information
UladzislauKutarkin committed Mar 6, 2024
1 parent 9528e06 commit aaebd51
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/QueryBuilder/ResultViewer/ResultViewer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const renderResultViewer = (props) => (
onSetDefaultColumns={setColumns}
height={300}
refreshInProgress={false}
forcedVisibleValues={['username']}
{...props}
/>
</QueryClientProvider>
Expand Down
5 changes: 2 additions & 3 deletions src/QueryBuilder/ResultViewer/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ export const getTableMetadata = (entityType, forcedVisibleValues) => {
return acc;
}, {});

const defaultVisibleColumns = defaultColumns?.filter(col => !!forcedVisibleValues
.find(value => value === col.value) || col.selected)
.map(col => col.value) || [];
const defaultVisibleColumns = defaultColumns?.filter(col => !!forcedVisibleValues?.find(value => value === col.value)
|| col.selected).map(col => col.value) || [];

const formatter = defaultColumns.reduce((formatted, column) => {
const { value, dataType, properties } = column;
Expand Down

0 comments on commit aaebd51

Please sign in to comment.