Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

fix: Form action in case of undefined should use Remix Form to avoid reload (#3327)

Ivan Starkovb770a516afbc
diff --git a/packages/sdk-components-react-remix/src/remix-form.tsx b/packages/sdk-components-react-remix/src/remix-form.tsx
index bd2d9ac734..960093d18b 100644
--- a/packages/sdk-components-react-remix/src/remix-form.tsx
+++ b/packages/sdk-components-react-remix/src/remix-form.tsx
@@ -13,7 +13,11 @@ export const RemixForm = forwardRef<
}
>((props, ref) => {
// remix casts action to relative url
- if (props.action === "" || props.action?.startsWith("/")) {
+ if (
+ props.action === undefined ||
+ props.action === "" ||
+ props.action?.startsWith("/")
+ ) {
return <Form {...props} ref={ref} />;
}
return <form {...props} ref={ref} />;