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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 = () => {
onClose();
const timer = setTimeout(() => {
reset(defaultValues);
clearTimeout(timer);
}, 350);
onClose();
};
const onSubmit = async () => {