Prevent page reload when clicking on the action
This commit is contained in:
parent
9b805d362c
commit
ff80a518ed
|
@ -4,7 +4,14 @@ export const ActionCellRender =
|
||||||
(action: string, onClick: (row: string[]) => void) =>
|
(action: string, onClick: (row: string[]) => void) =>
|
||||||
(_: string, row: string[]) => {
|
(_: string, row: string[]) => {
|
||||||
return (
|
return (
|
||||||
<a href="#" onClick={() => onClick(row)} className="cell--action">
|
<a
|
||||||
|
href="#"
|
||||||
|
onClick={(e) => {
|
||||||
|
e.preventDefault();
|
||||||
|
onClick(row);
|
||||||
|
}}
|
||||||
|
className="cell--action"
|
||||||
|
>
|
||||||
<SimpleText variant="primary" bold={true}>
|
<SimpleText variant="primary" bold={true}>
|
||||||
{action}
|
{action}
|
||||||
</SimpleText>
|
</SimpleText>
|
||||||
|
|
Loading…
Reference in New Issue