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

Move dialog onConfirm handlers into modals that concern them #1321

Open
rikimaru0345 opened this issue Jul 9, 2024 · 0 comments
Open

Move dialog onConfirm handlers into modals that concern them #1321

rikimaru0345 opened this issue Jul 9, 2024 · 0 comments

Comments

@rikimaru0345
Copy link
Contributor

We have lots of modals that deal with (for example) deletion of resources.
These modals take an onConfirm handler, that deals with the aftermath (refreshing the resource list, showing toasts etc).

It doesn't really make sense that those would be in an extra callback, they can be inlined to the modal,
as the modals themselves are already specialized to the resource that is being modified/deleted.

That would reduce the amount of code whenever a modal is used, and prevent code duplication (the handling is the same, no matter where the call comes from anyway).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant