Skip to content

Commit

Permalink
improvement: add timeout before resetting data in workspace delete fo…
Browse files Browse the repository at this point in the history
…rm (#6598)
  • Loading branch information
prateekshourya29 authored Feb 12, 2025
1 parent 6a3ccaf commit 8cff059
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion web/core/components/workspace/delete-workspace-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ export const DeleteWorkspaceForm: React.FC<Props> = observer((props) => {
const canDelete = watch("workspaceName") === data?.name && watch("confirmDelete") === "delete my workspace";

const handleClose = () => {
const timer = setTimeout(() => {
reset(defaultValues);
clearTimeout(timer);
}, 350);

onClose();
reset(defaultValues);
};

const onSubmit = async () => {
Expand Down

0 comments on commit 8cff059

Please sign in to comment.