From 984ad22ae87a0094bfd2efa7241d4fa14c8220c4 Mon Sep 17 00:00:00 2001 From: rizky Date: Mon, 29 Jul 2024 05:22:07 -0700 Subject: [PATCH] fix loading field --- comps/form/field/FieldInput.tsx | 140 ++++++++++++++++---------------- 1 file changed, 71 insertions(+), 69 deletions(-) diff --git a/comps/form/field/FieldInput.tsx b/comps/form/field/FieldInput.tsx index ad23475..200fb48 100755 --- a/comps/form/field/FieldInput.tsx +++ b/comps/form/field/FieldInput.tsx @@ -130,79 +130,81 @@ export const FieldInput: FC<{ ` )} > - {prefix && prefix !== "" ? ( -
- {prefix} -
- ) : ( - <> - )} {fm.status === "loading" ? ( ) : ( -
- {not_ready ? ( - not_ready - ) : ( - <> - {type_field === "custom" && arg.custom ? ( - <>{custom} - ) : ( - <> - {type_field === "link" && ( - - )} - {["date", "input"].includes(type_field) ? ( - - ) : ["single-option"].includes(type_field) ? ( - - ) : ["multi-option"].includes(type_field) ? ( - arg.sub_type === "table-edit" ? ( - table_edit - ) : ( - - ) - ) : ( - <>{isValidElement(type_field) && type_field} - )} - - )} - - )} -
- )} - {suffix && suffix !== "" ? ( -
- {suffix} -
- ) : ( - <> + > + {prefix} + + ) : ( + <> + )} +
+ {not_ready ? ( + not_ready + ) : ( + <> + {type_field === "custom" && arg.custom ? ( + <>{custom} + ) : ( + <> + {type_field === "link" && ( + + )} + {["date", "input"].includes(type_field) ? ( + + ) : ["single-option"].includes(type_field) ? ( + + ) : ["multi-option"].includes(type_field) ? ( + arg.sub_type === "table-edit" ? ( + table_edit + ) : ( + + ) + ) : ( + <>{isValidElement(type_field) && type_field} + )} + + )} + + )} +
+ {suffix && suffix !== "" ? ( +
+ {suffix} +
+ ) : ( + <> + )} + )} );