Skip to content
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

Prevent patient registration form from being edited before form initialization #140

Open
samau3 opened this issue Oct 14, 2024 · 0 comments
Assignees

Comments

@samau3
Copy link
Contributor

samau3 commented Oct 14, 2024

Since the form needs to initialize values based on the response from the server, a user may start typing in the form before initialization is finished. This would cause unexpected data loss, so the use of enhanceGetInputProps should be used per the Mantine documentation.

The relevant piece from the linked documentation:

Note that form.initialize will erase all values that were set before it was called. It is usually a good idea to set readOnly or disabled on all form fields before form.initialize is called to prevent data loss. You can implement this with enhanceGetInputProps

@codergirl01 codergirl01 self-assigned this Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants