From 58936d894ffb57e7c9d216c5d5910dd24b259725 Mon Sep 17 00:00:00 2001 From: faisolavolut Date: Wed, 5 Mar 2025 15:36:45 +0700 Subject: [PATCH] fix: improve is_disable logic for better clarity in Field component --- components/form/Field.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/form/Field.tsx b/components/form/Field.tsx index 1933cfc..eda2a93 100644 --- a/components/form/Field.tsx +++ b/components/form/Field.tsx @@ -134,7 +134,8 @@ export const Field: React.FC = ({ pagination, search, }; - const is_disable = fm.mode === "view" ? true : disabled; + const is_disable = + disabled === false ? false : fm.mode === "view" ? true : disabled; const error = fm.error?.[name]; useEffect(() => { setTimeout(() => {