GraphCommerce® is a headless storefront replacement for Magento 2 (PWA), that delivers a faster, better user experience. Fully customizable (React, Next.js) and open-source.
The step key is not passed in during the ASSIGNdispatch() on Line 21 of: node_modules/@graphcommerce/react-hook-form/src/ComposedForm/useFormCompose.ts. As a result, the forms ignore the expected step ordering.
Solution:
-dispatch({ type: 'ASSIGN', key, form: form as UseFormReturn<FieldValues>, submit })
+dispatch({ type: 'ASSIGN', key, form: form as UseFormReturn<FieldValues>, submit, step })
A TypeScript modification would be necessary as well.
Describe the Bug
Files:
node_modules/@graphcommerce/react-hook-form/src/ComposedForm/useFormCompose.ts
node_modules/@graphcommerce/react-hook-form/src/ComposedForm/ComposedSubmit.tsx
Description
The
step
key is not passed in during theASSIGN
dispatch()
on Line 21 of:node_modules/@graphcommerce/react-hook-form/src/ComposedForm/useFormCompose.ts
. As a result, the forms ignore the expected step ordering.Solution:
A TypeScript modification would be necessary as well.
Here's the full
.patch
file that works:Expected Behavior
The
step
values are used to build the array. The code is already there to handle this, it's just not receiving the info it needs.To Reproduce
step
order.