fix field dropdown on change
This commit is contained in:
parent
3b1e65607c
commit
1facc07784
|
|
@ -174,11 +174,6 @@ export const Form: FC<FMProps> = (props) => {
|
|||
if (fm.status === "resizing") {
|
||||
fm.status = "ready";
|
||||
}
|
||||
// useEffect(() => {
|
||||
// setTimeout(() => {
|
||||
// fm.render();
|
||||
// }, 100);
|
||||
// }, []);
|
||||
return (
|
||||
<form
|
||||
onSubmit={(e) => {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export const Field: FC<FieldProp> = (arg) => {
|
|||
fm.render();
|
||||
}
|
||||
}, [fm.data[name]]);
|
||||
|
||||
if (field.status === "init" && !isEditor) return null;
|
||||
const errors = fm.error.get(name);
|
||||
const props = { ...arg.props };
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
|
|
@ -639,8 +639,8 @@ export const TableList: FC<TableListProp> = ({
|
|||
},
|
||||
},
|
||||
]}
|
||||
rows={genRows(200)}
|
||||
/>
|
||||
rows={genRows(200)}
|
||||
/>
|
||||
) : (
|
||||
<>
|
||||
<DataGrid
|
||||
|
|
|
|||
Loading…
Reference in New Issue