From 822f50595ae40301b81a97a0ed252ef19616e36c Mon Sep 17 00:00:00 2001 From: faisolavolut Date: Fri, 14 Feb 2025 13:07:40 +0700 Subject: [PATCH] feat: make afterLoad callback in Form component asynchronous for improved data handling --- components/form/Form.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/form/Form.tsx b/components/form/Form.tsx index eb2c9aa..c59d60f 100644 --- a/components/form/Form.tsx +++ b/components/form/Form.tsx @@ -188,7 +188,7 @@ export const Form: React.FC = ({ local.data = res; local.render(); // Panggil render setelah data diperbarui if (typeof afterLoad === "function") { - afterLoad(local); + await afterLoad(local); } setTimeout(() => { toast.dismiss();