-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add destroyOnUnregister property #206
Conversation
Preview is ready. |
Playwright Test Component is ready. |
form.change(store.name, undefined); | ||
} | ||
}; | ||
}, []); | ||
}, [destroyOnUnregister]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here this flag should not cause an effect, its value will be relevant in the callback, this is the main thing that we need
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its value will be relevant in the callback
I don't think so, on "unmount" it will have the first value provided in this case, and it will be not updated on prop change.
But generally, yes, the "logic part" shouldn't be triggered by its value change. And most likely it won't be changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, on "unmount" it will have the first value provided in this case, and it will be not updated on prop change.
Oh, you're right, we'll have to go back to this place and make the flag and store.name the callback was relevant
By default, dynamic forms clear the final form field value on unmount. This should be configurable. The name of the property and its description comes from the final form docs