Skip to content

Commit

Permalink
fix(ui): row ids should be auto-generated (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
talboren authored Jan 25, 2024
1 parent 7ad31b2 commit 500bdfa
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions keep-ui/app/alerts/alert-table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ export const getColumnsOrder = (presetName?: string): ColumnOrderState => {
return [];
};

const hardcodedDefaultHidden = [
"playbook_url",
"ack_status",
"deletedAt",
"created_by",
"assignees",
];

export const getHiddenColumns = (
presetName?: string,
columns?: ColumnDef<AlertDto>[]
Expand All @@ -84,8 +92,7 @@ export const getHiddenColumns = (
.map((c) => c.id!) ?? [];
if (presetName === undefined) {
return getDefaultColumnVisibility({}, [
"playbook_url",
"ack_status",
...hardcodedDefaultHidden,
...defaultHidden,
]);
}
Expand All @@ -99,8 +106,7 @@ export const getHiddenColumns = (
}

return getDefaultColumnVisibility({}, [
"playbook_url",
"ack_status",
...hardcodedDefaultHidden,
...defaultHidden,
]);
};
Expand Down Expand Up @@ -344,7 +350,6 @@ export function AlertTable({
onColumnOrderChange: setColumnOrder,
onColumnVisibilityChange: setColumnVisibility,
onRowSelectionChange: rowSelection?.onChange,
getRowId: (row) => row.fingerprint,
});

return (
Expand Down

1 comment on commit 500bdfa

@vercel
Copy link

@vercel vercel bot commented on 500bdfa Jan 25, 2024

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

keep – ./

keep-eight.vercel.app
keep-git-main-keephq.vercel.app
platform.keephq.dev
keep-keephq.vercel.app

Please sign in to comment.