Giter VIP home page Giter VIP logo

Comments (7)

NhielSalvana avatar NhielSalvana commented on July 28, 2024 1

@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.

danielweinmann avatar danielweinmann commented on July 28, 2024 1

Thank you guys for your contribution!

from remix-forms.

NhielSalvana avatar NhielSalvana commented on July 28, 2024

@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.

sobrinho avatar sobrinho commented on July 28, 2024

Would you mind opening a PR fixing this?

from remix-forms.

brunocrosier avatar brunocrosier commented on July 28, 2024

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.

sobrinho avatar sobrinho commented on July 28, 2024

@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.

danielweinmann avatar danielweinmann commented on July 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.