Skip to content

Commit

Permalink
Update DisasterTable.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
ericboucher committed Sep 9, 2024
1 parent 539cb34 commit 0e8aa21
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions apps/frontend/components/DisasterTable/DisasterTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,15 @@ export const DisasterTable = ({
// TODO - activate column visibility model when PR is stable
const columnVisibilityModel = {}; // generateColumnVisibilityModel(columns, data);

const nonEmptyData = data.filter(row =>
columns.some(column => {
const value = row[column.field];
const nonEmptyData = isEditable
? data
: data.filter(row =>
columns.some(column => {
const value = row[column.field];

return value !== undefined && value !== '';
}),
);
return value !== undefined && value !== '';
}),
);

const hasGroups = columnGroup.length > 0;
const withTopCellDef = columnGroup.map(x => ({
Expand Down

0 comments on commit 0e8aa21

Please sign in to comment.