-
Notifications
You must be signed in to change notification settings - Fork 85
(feat)O3-2971: Adding conformation modal for an empty form. #464
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
base: main
Are you sure you want to change the base?
Conversation
I made many changes to the form-factory-provider , I would like it to be reviewed in case it can be designed better @NethmiRodrigo @samuelmale @denniskigen |
Reated PR: |
I made the changes according to the discussion in the JIRA, can it be reviewed again @denniskigen @samuelmale @NethmiRodrigo |
@@ -127,6 +129,8 @@ const FormEngine = ({ | |||
provider={session?.currentProvider} | |||
visit={visit} | |||
handleConfirmQuestionDeletion={handleConfirmQuestionDeletion} | |||
handleEmptyFormSubmission={handleEmptyFormSubmission} | |||
handleDiscardForm={handleClose} |
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.
You may not have to add this considering that handleClose
is basically a workspace property.
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.
Then how should I approach this , should i call the workspace method directly?
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.
After a second look, I realized you added this property to the FormFactoryProvider
as opposed to the root component as I had previously assumed, my bad! It seems like we are lifting the handleClose
property twice, any reason for not using formSubmissionProps.handleClose
?
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.
Cause that handleClose is passed as a void function in the formProps
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.
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.
Ooppss!! That's something we should fix. Can you update those props with valid values from the parent component and use that instead? (It's probably safe to get rid of the onError
prop)
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.
There was an issue when i updated it with the value the form never opened ig that's the reason it was not passed as for removing onError properly i can do it.
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.
Which error do you get exactly?
Requirements
Summary
This PR adds a feature which triggers a conformation modal when User submits an empty form.
Screenshots
OpenMRS.-.Google.Chrome.2025-02-11.23-09-36.mp4
Related Issue
Other