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: pass form save result to onSuccess handler #1145

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Jshhhh
Copy link
Contributor

@Jshhhh Jshhhh commented Jan 29, 2024

Problem

Fields object is passed into onSuccess handler in forms. The result of save call would be more helpful

Solution

pass save result to onSuccess handler

Manual tests

Manual save local

Automated tests

  • Unit tests added/updated
  • E2E tests added/updated
  • N/A - (provide a reason)
  • deferred - (provide GitHub issue for tracking)

Housekeeping

  • No non-essential console logs
  • All new files contain license notice

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@Jshhhh Jshhhh requested a review from a team as a code owner January 29, 2024 21:48
@@ -70,7 +70,7 @@ exports[`form-render utils should generate before & complete types if datastore
"{
clearOnSuccess?: boolean;
onSubmit?: (fields: mySampleFormInputValues) => mySampleFormInputValues;
onSuccess?: (fields: mySampleFormInputValues) => void;
onSuccess?: (result: any) => void;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in love with the any. Don't we know the full shape of the object including Ids?

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.

2 participants