fix field
This commit is contained in:
parent
dcc7a39a37
commit
b2b34659c6
|
|
@ -101,7 +101,7 @@ export const newField = async (
|
|||
type: "date",
|
||||
ext__show_label: show ? "y" : "n",
|
||||
ext__required: field.optional ? "n" : "y",
|
||||
sub_type: "datetime",
|
||||
sub_type: "date",
|
||||
child: {
|
||||
childs: [],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ export const generateField = async (
|
|||
commit: boolean
|
||||
) => {
|
||||
let fieldType = getString(data.sub_type.value) as string;
|
||||
|
||||
let table = getString(data.rel__gen_table.value) as string;
|
||||
const raw_fields = JSON.parse(data.rel__gen_fields.value) as (
|
||||
| string
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
|||
}
|
||||
}
|
||||
if (should_load) {
|
||||
if (!on_load) {
|
||||
console.error("Form on_load is empty. Please re-generate the form.");
|
||||
} else {
|
||||
const on_load_result = on_load({ fm });
|
||||
let result = undefined;
|
||||
if (
|
||||
|
|
@ -79,6 +82,7 @@ export const formInit = (fm: FMLocal, props: FMProps) => {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fm.internal.reload.done.map((e) => e());
|
||||
setTimeout(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue