Skip to content

Revalidating breaks form actions #542

Description

@kf5v

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions