From ff80a518edcba9caba6f2fae10f79b9907260076 Mon Sep 17 00:00:00 2001 From: Arnaud Date: Thu, 22 Aug 2024 17:12:03 +0200 Subject: [PATCH] Prevent page reload when clicking on the action --- src/components/Table/ActionCellRender.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/components/Table/ActionCellRender.tsx b/src/components/Table/ActionCellRender.tsx index f0c6c03..6e91913 100644 --- a/src/components/Table/ActionCellRender.tsx +++ b/src/components/Table/ActionCellRender.tsx @@ -4,7 +4,14 @@ export const ActionCellRender = (action: string, onClick: (row: string[]) => void) => (_: string, row: string[]) => { return ( - onClick(row)} className="cell--action"> + { + e.preventDefault(); + onClick(row); + }} + className="cell--action" + > {action}