[cs] feat: 다이얼로그 닫힐 때 폼 및 쿼리 로직 초기화

This commit is contained in:
2026-02-06 11:26:40 +09:00
parent 7227b98961
commit 8565331e68
6 changed files with 58 additions and 23 deletions
@@ -1,4 +1,4 @@
import { useState, useRef } from "react";
import { useState, useRef, useEffect } from "react";
import { useQuery, useQueryClient } from "@tanstack/react-query";
import { getCoreRowModel, type ColumnDef } from "@tanstack/react-table";
import {
@@ -113,6 +113,10 @@ function MappingRoleDialog({
},
});
useEffect(() => {
if (!open) handleReset();
}, [open]);
return (
<Dialog open={open} onOpenChange={onOpenChange} {...props}>
<DialogTrigger asChild>