improvement: add timeout before resetting data in workspace delete form (#6598)
This commit is contained in:
parent
6a3ccafe35
commit
8cff059868
1 changed files with 5 additions and 1 deletions
|
|
@ -46,8 +46,12 @@ export const DeleteWorkspaceForm: React.FC<Props> = observer((props) => {
|
||||||
const canDelete = watch("workspaceName") === data?.name && watch("confirmDelete") === "delete my workspace";
|
const canDelete = watch("workspaceName") === data?.name && watch("confirmDelete") === "delete my workspace";
|
||||||
|
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
|
const timer = setTimeout(() => {
|
||||||
|
reset(defaultValues);
|
||||||
|
clearTimeout(timer);
|
||||||
|
}, 350);
|
||||||
|
|
||||||
onClose();
|
onClose();
|
||||||
reset(defaultValues);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const onSubmit = async () => {
|
const onSubmit = async () => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue