Comments (7)
@brunocrosier here https://github.com/SeasonedSoftware/remix-forms-site
@sobrinho If you're referring to me. I still don't know why they opted for the default behavior of having onSubmit
replace
the browser stack, they might have future plans and designed it that way to pave way for that. So I'll wait for the author to be back before opening a PR :)
from remix-forms.
Thank you guys for your contribution!
from remix-forms.
@brunocrosier I'm sure this is not best practice but in my case, I patched this using patch-package
.
npm install -D patch-package postinstall-postinstall
go to root directory
make a folder named patch
inside it have a file named remix-forms+0.16.1.patch
inside /patch/remix-forms+0.16.1.patch
is
diff --git a/node_modules/remix-forms/lib/Form.js b/node_modules/remix-forms/lib/Form.js
index 616a327..4a4f3ea 100644
--- a/node_modules/remix-forms/lib/Form.js
+++ b/node_modules/remix-forms/lib/Form.js
@@ -69,7 +69,7 @@ function Form({ component = react_2.Form, fetcher, mode = 'onSubmit', renderFiel
onTransition && onTransition({ transition, ...form });
}, [transition.state]);
const onSubmit = (event) => {
- form.handleSubmit(() => submit(event.target, { replace: true }))(event);
+ form.handleSubmit(() => submit(event.target, { replace: false }))(event);
};
const Field = (0, react_1.useMemo)(() => (0, createField_1.default)({
register: form.register,
add this to scripts
in package.json
"scripts":{
....
"postinstall": "patch-package"
....
}
rm -rf node_modules
then lastly npm install
this patch wont work when remix-forms updates, which is okay, since higher versions might address this
from remix-forms.
Would you mind opening a PR fixing this?
from remix-forms.
is the code for the docs website (https://remix-forms.seasoned.cc) open source? if so, can you send a link to the repo?
from remix-forms.
@NhielSalvana I'm here in behalf of Seasoned, open the PR and I will open an internal discussion to define if we should merge it! ;)
from remix-forms.
Hey, guys! Sorry for the silence: I had to focus on other things for a few days.
@brunocrosier, here goes the code for the site. We plan to move it to this repo soon, so we can have a monorepo with the package + the site. We've been using the site as our dev environment to add E2E tests. In the meantime, feel free to use it on the other repo.
@NhielSalvana, the { replace: true }
on the submit was there for the first use-case I had for Remix Forms but it doesn't make any sense anymore. I fixed it and published it on 0.16.2
.
from remix-forms.
Related Issues (20)
- Attach errors to Fields that are dynamically generated? HOT 2
- Inconsistent display of selected option in select control HOT 4
- Custom Component typings HOT 2
- Error: Cannot submit element that is not <form>, <button>, or <input type="submit|image"> HOT 1
- Multiple Checkboxes HOT 3
- Define Input type through fieldTypes HOT 5
- Bring `errorMessagesForSchema` from `domain-functions` to this library HOT 1
- form with mode="onChange" button flashes when it hydrates HOT 2
- Could not resolve "@deepkit/type" HOT 3
- Overriding fields HOT 2
- <Field hidden /> is not passing `type="hidden"` to its input
- Validation error not shown when field is an array
- Can't trigger onSubmit from Form-component HOT 6
- Handle `z.object` HOT 1
- Can remix-forms function within a PWA / client side only context? HOT 4
- Zod schema array of objects HOT 1
- Remix forms site example no longer maintained? HOT 1
- [BUG] Field error(s) not showing if using additional component HOT 1
- Input ID's not always unique when multiple forms are rendered
- Example of how to do crud correctly?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from remix-forms.