mirror of
https://github.com/codex-storage/codex-marketplace-ui-components.git
synced 2025-02-20 02:08:09 +00:00
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…
x
Reference in New Issue
Block a user