-
Notifications
You must be signed in to change notification settings - Fork 112
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
refactor(frontend): update deleteDialog logic #588
refactor(frontend): update deleteDialog logic #588
Conversation
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'm thinking about refactoring even more. Maybe we can have a single useDelete() that accepts an array of ids. Within the useMutation() it would decide to call either bulk delete or just delete. Let me know what you think.
It make a full sense, it's a good idea, happy to implement those enhancements 🚀 |
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.
LGTM ✔️ 🚀
onDeleteError = () => {}, | ||
onDeleteSuccess = () => {}, |
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.
onDeleteError = () => {}, | |
onDeleteSuccess = () => {}, | |
onError = () => {}, | |
onSuccess = () => {}, |
Since it's the delete dialog, it's kindof repetitive to indicate it again.
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.
The main motivation of this naming is to avoid overriding the onError attribute of the dialog component
Closed in favor of using useDialogs hook |
Motivation
The main motivation of this PR is to refactor delete useDialog, delete component and to introduce the new callbackHandler.
Fixes #587
Screenshots
Type of change:
Checklist: