improvement: add timeout before resetting data in workspace delete form (#6598)

This commit is contained in:
Prateek Shourya
2025-02-12 17:39:12 +05:30
committed by GitHub
parent 6a3ccafe35
commit 8cff059868

View File

@@ -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 () => {