Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@domonda/form

Package Overview
Dependencies
Maintainers
2
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domonda/form - npm Package Compare versions

Comparing version 2.3.5 to 2.3.6

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [2.3.6](https://github.com/domonda/domonda-js/compare/@domonda/form@2.3.5...@domonda/form@2.3.6) (2020-10-16)
### Bug Fixes
* **form:** Prevent multiple parallel submissions ([#61](https://github.com/domonda/domonda-js/issues/61)) ([d5bbc79](https://github.com/domonda/domonda-js/commit/d5bbc796fffc97f5f85ed9f356645f0bdbcd0d63))
## [2.3.5](https://github.com/domonda/domonda-js/compare/@domonda/form@2.3.4...@domonda/form@2.3.5) (2020-07-01)

@@ -8,0 +19,0 @@

9

createForm.js

@@ -93,3 +93,3 @@ /**

return __awaiter(this, void 0, void 0, function* () {
const { resetOnSuccessfulSubmit, resetOnFailedSubmit, onSubmit, disableOnSubmit, } = configRef.current;
const { resetOnSuccessfulSubmit, resetOnFailedSubmit, onSubmit, disableOnSubmit, autoSubmit, allowSubmitWhileSubmitting, } = configRef.current;
if (onSubmit) {

@@ -99,2 +99,9 @@ if (event) {

}
if (
// allow parallel submissions when `autoSubmit` is enabled by default
(allowSubmitWhileSubmitting === undefined && !autoSubmit && plumb.state.submitting) ||
// when explicitly set, never allow parallel submissions
(allowSubmitWhileSubmitting === false && plumb.state.submitting)) {
return;
}
plumb.next(Object.assign(Object.assign({}, plumb.state), { submitting: true, submitError: null, disabled: disableOnSubmit ? true : plumb.state.disabled }), FormTag.SUBMIT);

@@ -101,0 +108,0 @@ const { fields } = plumb.state;

@@ -29,3 +29,7 @@ /**

onSubmit?: FormSubmitHandler<T>;
/** Automatically submit the form when changes happen. */
/**
* Automatically submit the form when changes happen. Note that
* allowing multiple parallel submissions will be enabled by
* default when the form is in `autoSubmit` mode.
*/
autoSubmit?: boolean;

@@ -51,2 +55,11 @@ /**

transformer?: Transformer<T, FormTag>;
/**
* The form by default prevents multiple parallel submissions, submitting
* is only possible if there is no submit in-flight. BEWARE: when the form is
* in `autoSubmit` mode, parallel submissions will be enabled by default.
*
* Set this prop to `true` to allow parallel submissions *always*. Set to `false`
* to prevent parallel submissions *always*.
*/
allowSubmitWhileSubmitting?: boolean;
}

@@ -53,0 +66,0 @@ export interface FormFieldState {

2

package.json
{
"name": "@domonda/form",
"version": "2.3.5",
"version": "2.3.6",
"description": "Powerful yet simple form library built using @domonda/plumb.",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc