fix: improve is_disable logic for better clarity in Field component

This commit is contained in:
faisolavolut 2025-03-05 15:36:45 +07:00
parent b9f08cf46c
commit 58936d894f
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ export const Field: React.FC<FieldProps> = ({
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(() => {