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: mutationOptions in core hooks #3324

Merged
merged 9 commits into from Jan 2, 2023

Conversation

aliemir
Copy link
Member

@aliemir aliemir commented Dec 29, 2022

Added the ability to pass mutation options to useMutation hooks in mutation hooks:

  • useCreate (data)
  • useUpdate (data)
  • useDelete (data)
  • useDeleteMany (data)
  • useUpdateMany (data)
  • useCreateMany (data)
  • useCustomMutation (data)
  • useLogin (auth)
  • useLogout (auth)
  • useRegister (auth)
  • useForgotPassword (auth)
  • useUpdatePassword (auth)
  • useForm (form)
  • useLog (audit log)

Also includes changes in @pankod/refine-antd for:

  • useForm
  • useStepsForm
  • useModalForm
  • useDrawerForm

hooks.

Users now can pass mutationOptions config property to pass custom options to the useMutation hooks.

Warning

This PR is marked as draft to make sure buttons in UI packages are also compatible with the latest changes.

Self Check before Merge

Please check all items below before review.

  • Corresponding issues are created/updated or not needed
  • Docs are updated/provided or not needed
  • Examples are updated/provided or not needed
  • TypeScript definitions are updated/provided or not needed
  • Tests are updated/provided or not needed
  • Changesets are provided or not needed

@changeset-bot
Copy link

changeset-bot bot commented Dec 29, 2022

🦋 Changeset detected

Latest commit: 3376b49

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@netlify
Copy link

netlify bot commented Dec 29, 2022

Deploy Preview for refine-doc-live-previews ready!

Name Link
🔨 Latest commit 3376b49
🔍 Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/63ada4ffd31ea20009e22686
😎 Deploy Preview https://deploy-preview-3324--refine-doc-live-previews.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@refine-bot refine-bot temporarily deployed to deploy-preview-mui-3324 December 29, 2022 14:10 Inactive
@refine-bot refine-bot temporarily deployed to deploy-preview-antd-3324 December 29, 2022 14:10 Inactive
@omeraplak omeraplak merged commit 9bfb347 into next Jan 2, 2023
@omeraplak omeraplak deleted the feat/mutation-options-in-mutation-hooks branch January 2, 2023 09:40
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

5 participants