diff --git a/comps/form/Form.tsx b/comps/form/Form.tsx index b0ac730..4f32596 100755 --- a/comps/form/Form.tsx +++ b/comps/form/Form.tsx @@ -174,11 +174,6 @@ export const Form: FC = (props) => { if (fm.status === "resizing") { fm.status = "ready"; } - // useEffect(() => { - // setTimeout(() => { - // fm.render(); - // }, 100); - // }, []); return (
{ diff --git a/comps/form/field/Field.tsx b/comps/form/field/Field.tsx index ea092d7..b824c56 100755 --- a/comps/form/field/Field.tsx +++ b/comps/form/field/Field.tsx @@ -34,6 +34,7 @@ export const Field: FC = (arg) => { fm.render(); } }, [fm.data[name]]); + if (field.status === "init" && !isEditor) return null; const errors = fm.error.get(name); const props = { ...arg.props }; diff --git a/comps/form/field/type/TypeDropdown.tsx b/comps/form/field/type/TypeDropdown.tsx index 8516d63..185835b 100755 --- a/comps/form/field/type/TypeDropdown.tsx +++ b/comps/form/field/type/TypeDropdown.tsx @@ -56,6 +56,7 @@ export const TypeDropdown: FC<{ type: field.type, }) : fm.data[field.name]; + if ( field.type === "single-option" && !value && @@ -140,6 +141,8 @@ export const TypeDropdown: FC<{ }); } + fm.data[field.name] = item?.value; + return item?.value || search; }} disabled={disabled} diff --git a/comps/list/TableList.tsx b/comps/list/TableList.tsx index e69c13f..6c09fb1 100755 --- a/comps/list/TableList.tsx +++ b/comps/list/TableList.tsx @@ -639,8 +639,8 @@ export const TableList: FC = ({ }, }, ]} - rows={genRows(200)} - /> + rows={genRows(200)} + /> ) : ( <>