solid-router icon indicating copy to clipboard operation
solid-router copied to clipboard

Revalidating breaks form actions

Open kf5v opened this issue 5 months ago • 0 comments

Describe the bug

When revalidation is triggered, forms that have a defined action lose their connection with the solid-router.

The form submission bypasses the router and redirects the browser to a URL like: http://localhost:3000/_server?id=src_routes_about_tsx--helloWorld_action&name=....

Your Example Website or App

https://stackblitz.com/edit/github-p2jyupw6?file=src%2Froutes%2Fabout.tsx

Steps to Reproduce the Bug or Issue

  1. On About page
  2. Click any "Hello World!" button to submit the form once
  3. The form is submitted and items get revalidated
  4. Now when you try to submit once gain any of the form - application is redirected to white page

Expected behavior

I would expect that after revalidation any forms with actions will continue to be interactive with solid-router

Screenshots or Videos

No response

Platform

  • OS: Linux
  • Browser: Chrome
  • Version: 123

Additional context

If instead of array of objects, getItems returns array of string so instead of

  return [...'abcdefghijklmnopqrstuvwxyz'].map((name) => ({ name }));

it is

  return [...'abcdefghijklmnopqrstuvwxyz'];

and later using the string directly then the issue does not appear

kf5v avatar Sep 08 '25 17:09 kf5v