We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello, it seems that the action always resolve on form submit even when prevent default is used.
https://github.com/SarguelUnda/solidrouter-action-issue
As a user, I expect the action to only resolve if the the submit event goes through
No response
relevant part of the code:
const [count, setCount] = createSignal(0) const myAction = action(async (data: FormData) => { setCount(c => c + 1) console.log("ACTION") }); const mySubmit = (e: SubmitEvent) => { console.log("onSubmit") e.preventDefault() } const MyForm = () => <> <form action="https://www.solidjs.com/" onSubmit={mySubmit} method="post"> <button type="submit">Click Me</button> </form> <form action={myAction} onSubmit={mySubmit} method="post"> <button type="submit">Click Me</button> </form> I should always stay at 0 : {count()} </> const App = () => { return <Router> <Route path="*" component={MyForm} /> </Router> }
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Describe the bug
Hello, it seems that the action always resolve on form submit even when prevent default is used.
Your Example Website or App
https://github.com/SarguelUnda/solidrouter-action-issue
Steps to Reproduce the Bug or Issue
Expected behavior
As a user, I expect the action to only resolve if the the submit event goes through
Screenshots or Videos
No response
Platform
Additional context
relevant part of the code:
The text was updated successfully, but these errors were encountered: