Closed gmukul01 closed 1 year ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
CI is running/has finished running commands for commit 7ec23294083afbdd30211ccae555d7a6eb8da238. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
π See all runs for this branch
Sent with π from NxCloud.
affects: @medly-components/forms
PR Checklist
Description
Make form component generic so that its
intialState, onSubmit, fieldSchema & onChange
can all take same data type.Type of change
How has this been tested?
(Replace This Text: Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.)
[ ] Test A
[ ] Test B
Fixes #
What is the current behaviour?
Form data type is
Record<string, any>
forintialState, onSubmit, fieldSchema & onChange
What is the new behaviour?
Form data type is now generic and you have to pass unique data type for
intialState, onSubmit, fieldSchema & onChange
. If you pass different data type then typescript will throw error.Does this PR introduce a breaking change?
Note: (Replace This Text: If this PR contains a breaking change please describe the impact and migration path for existing application.)
Additional context
(Replace This Text: Please describe any other related information or add screenshots of the PR.)
Checklist
[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules