GithubHelp home page GithubHelp logo

Comments (4)

justin-schroeder avatar justin-schroeder commented on July 17, 2024

I’m not seeing this behavior. Can you perhaps give a step-by-step procedure to reproduce it?

from formkit.

zgurea1 avatar zgurea1 commented on July 17, 2024

Here we fill the form and we see it in localstorage.

image

After you submit the form, localstorage remain.

image

from formkit.

justin-schroeder avatar justin-schroeder commented on July 17, 2024

I see what you’re saying. I guess I would have a different expectation than you about what should happen here. In my view, the form should reset to it’s initial state which includes the file property{ file: [] }) since the the file input type should always be set to an array even when empty, and the local storage should always be a reflection of that precise state, even if that state is empty.

I think your expectation is that when a form is "empty" there is no local storage at all, is that correct?

If so then the primary question becomes how we determine what the "initial" or "empty" state of the form is. This is complicated by the fact that some inputs provide initial values, such as the file input or multiple checkboxes. Knowing what an "empty" form is becomes rather complex.

Is there any deleterious effect from the local storage existing when the form is in an empty state?

from formkit.

andrew-boyd avatar andrew-boyd commented on July 17, 2024

Closing — please feel free to re-open if there's an argument against the current behavior.

from formkit.

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.