Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

[react-form] dynamicList value is reverted to default value after submit when using makeCleanAfterSubmit #2353

Open
alexmic opened this issue Jul 19, 2022 · 0 comments
Labels
Type: Bug 🐛 Something isn't working

Comments

@alexmic
Copy link

alexmic commented Jul 19, 2022

Overview

Using makeCleanAfterSubmit: true reverts the value of dynamic lists to the default value instead of the (successfully) submitted value.

I've managed to fix the issue locally by adding dynamicListBagRef.current = dynamicListBag; after https://github.com/Shopify/quilt/blob/main/packages/react-form/src/hooks/submit.ts#L32 but I am not sure if this is the right solution.

@alexmic alexmic added the Type: Bug 🐛 Something isn't working label Jul 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Type: Bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant