brainfoolong / form-data-json

A zero dependency, cross browser library to easily get or set/manipulate form input values as/from a json object.
https://brainfoolong.github.io/form-data-json
MIT License
57 stars 10 forks source link

v2-dev: implement `resetOthers` similar to .reset/.clear methods #14

Closed KES777 closed 2 years ago

KES777 commented 2 years ago

Is your feature request related to a problem? Please describe. We have clear, reset methods:

FormDataJson.reset(document.querySelector("form"))
FormDataJson.clear(document.querySelector("form"))

But only one option: clearOthers

Describe the solution you'd like Impelement resetOthers option for usage with FormDataJson.fromJson( ... )

brainfoolong commented 2 years ago

Yep, didn't added it because i didn't saw a real world usage for this. But yes, it's just a few lines to add that feature and will add it.

brainfoolong commented 2 years ago

Thx for request. Now implemented in 2.0.3beta

KES777 commented 2 years ago

Did not check functionality, yet, but I see: option is implemented. Thank you