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

feat(Form): add support for onSubmit and onReset #3750

Merged
merged 2 commits into from
Apr 26, 2024
Merged

Conversation

simonguo
Copy link
Member

@simonguo simonguo commented Apr 19, 2024

Props

Prop Type (default) Description
onReset (formValue: object, event?: FormEvent) => void Callback fired when form reset
onSubmit (formValue: object, event?: FormEvent) => void Callback fired when form submit, only when the form data is validated will trigger

Methods

Name Type Description
reset () => void Reset form data to initial value and clear all error messages
submit () => void Trigger form submission and verify data

Copy link

codesandbox bot commented Apr 19, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Apr 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rsuite-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 9:54am
rsuite-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2024 9:54am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
rsuite-v4 ⬜️ Ignored (Inspect) Visit Preview Apr 19, 2024 9:54am

Copy link

codesandbox-ci bot commented Apr 19, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 99.37107% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 93.82%. Comparing base (5ceb15a) to head (dfc1207).
Report is 1 commits behind head on main.

Files Patch % Lines
src/Form/hooks/useFormValidate.ts 85.71% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3750      +/-   ##
==========================================
+ Coverage   93.76%   93.82%   +0.06%     
==========================================
  Files         655      655              
  Lines       22631    22739     +108     
  Branches     3081     3084       +3     
==========================================
+ Hits        21219    21334     +115     
+ Misses        723      716       -7     
  Partials      689      689              
Flag Coverage Δ
ChromeCi 93.77% <99.37%> (+0.06%) ⬆️
Firefox 93.15% <99.37%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@simonguo simonguo merged commit d9b747e into main Apr 26, 2024
16 checks passed
@simonguo simonguo deleted the feat/form-submit branch April 26, 2024 08:18
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

Successfully merging this pull request may close these issues.

None yet

1 participant