-
Notifications
You must be signed in to change notification settings - Fork 612
fix: reset form values for delete role and delete permission dialogs #2529
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
Changes from all commits
0901a95
8cc64bd
9411615
4fc41b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,11 @@ export const DeleteRole: React.FC<Props> = ({ trigger, role }) => { | |
| }, | ||
| }); | ||
|
|
||
| function handleDialogOpenChange(newState: boolean) { | ||
| setOpen(newState); | ||
| form.reset(); | ||
| } | ||
|
Comment on lines
+68
to
+71
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove duplicate function declaration. The - function handleDialogOpenChange(newState: boolean) {
- setOpen(newState);
- form.reset();
- }Also applies to: 101-104 🧰 Tools🪛 Biome
|
||
|
|
||
| async function onSubmit() { | ||
| deleteRole.mutate({ roleId: role.id }); | ||
| } | ||
|
|
||
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.
Remove duplicate function definition.
The
handleDialogOpenChangefunction is defined twice with identical implementation. This appears to be a merge or copy-paste error.Remove one of the duplicate function definitions:
Also applies to: 77-80
🧰 Tools
🪛 Biome