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
Implement save form feature #4
Conversation
@kumuditha-udayanga could you possibly update CI to deploy this to dev3? |
@jonathandick, I updated the deployment process |
@kumuditha-udayanga thanks for raising the PR, but can you annotate this PR with relevant attachments to visualise your changes? |
Hi @samuelmale thank you for reviewing, I updated the PR, attached few screenshots of the changes and a screen record link. |
@kumuditha-udayanga don't you think the form name can be inferred from the form json? |
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.
Nice work, just a few minor comments
const openModal = (option) => { | ||
if (option === "newVersion") { | ||
setSaveState("newVersion"); | ||
setOpenConfirmSaveModal(false); | ||
setOpenSaveFormModal(true); | ||
} else if (option === "new") { | ||
setSaveState("newVersion"); | ||
setOpenSaveFormModal(true); | ||
} else if (option === "update") { | ||
setSaveState("update"); | ||
setOpenConfirmSaveModal(false); | ||
setOpenSaveFormModal(true); | ||
} | ||
}; |
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 would wrap this in a useCallback
src/context/context.tsx
Outdated
@@ -0,0 +1,3 @@ | |||
import { createContext } from "react"; | |||
|
|||
export const SchemaContext = createContext(null); |
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.
Can you define typings for the SchemaContext
?
Purpose
Screenshots
Demo on creating new forms
https://vimeo.com/738267453