From 164feaa3ec64944b908c8e72ae23c552638bfa01 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 3 Aug 2025 20:01:54 +0300 Subject: [PATCH] fix(react): button not working as submit --- apps/client/src/widgets/react/Button.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/client/src/widgets/react/Button.tsx b/apps/client/src/widgets/react/Button.tsx index 2dbceafa0..1fa8822ac 100644 --- a/apps/client/src/widgets/react/Button.tsx +++ b/apps/client/src/widgets/react/Button.tsx @@ -4,6 +4,7 @@ interface ButtonProps { text: string; className?: string; keyboardShortcut?: string; + /** Called when the button is clicked. If not set, the button will submit the form (if any). */ onClick?: () => void; } @@ -20,7 +21,7 @@ export default function Button({ className, text, onClick, keyboardShortcut }: B return (