@graphcommerce/react-hook-form 3.3.2 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.3.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1629](https://github.com/graphcommerce-org/graphcommerce/pull/1629) [`662f510c2`](https://github.com/graphcommerce-org/graphcommerce/commit/662f510c21fc44a63036e5c7a0726ccb33c31600) Thanks [@paales](https://github.com/paales)! - The submit button would remain in a loading state when all composed forms were invalid
8
+
3
9
  ## 3.3.2
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/react-hook-form",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "3.3.2",
5
+ "version": "3.3.3",
6
6
  "sideEffects": false,
7
7
  "prettier": "@graphcommerce/prettier-config-pwa",
8
8
  "eslintConfig": {
@@ -104,7 +104,12 @@ export function ComposedSubmit(props: ComposedSubmitProps) {
104
104
  throw e
105
105
  }
106
106
  }
107
- dispatch({ type: 'SUBMITTING' })
107
+
108
+ dispatch(
109
+ invalidKeys.length === 0
110
+ ? { type: 'SUBMITTING' }
111
+ : { type: 'SUBMITTED', isSubmitSuccessful: false },
112
+ )
108
113
  } catch (error) {
109
114
  dispatch({ type: 'SUBMITTED', isSubmitSuccessful: false })
110
115
  }
@@ -1,5 +1,5 @@
1
1
  import type { TypedDocumentNode } from '@apollo/client'
2
- import {
2
+ import type {
3
3
  DefinitionNode,
4
4
  OperationDefinitionNode,
5
5
  ValueNode,