fix
This commit is contained in:
parent
9e35d38f13
commit
c9e591fac3
|
|
@ -22,7 +22,12 @@ export type GFCol = {
|
|||
};
|
||||
export const newField = async (
|
||||
field: GFCol,
|
||||
opt: { parent_table: string; value: Array<string>; on_change?: string },
|
||||
opt: {
|
||||
parent_table: string;
|
||||
value: Array<string>;
|
||||
on_change?: string;
|
||||
is_from_table_edit?: boolean;
|
||||
},
|
||||
show_label: boolean
|
||||
) => {
|
||||
let show = typeof show_label === "boolean" ? show_label : true;
|
||||
|
|
|
|||
|
|
@ -68,7 +68,11 @@ export const generateForm = async (
|
|||
if (["has-one", "has-many"].includes(item.type)) {
|
||||
value = get(item, "value.checked") as any;
|
||||
}
|
||||
const field = await newField(item, { parent_table: table, value }, true);
|
||||
const field = await newField(
|
||||
item,
|
||||
{ parent_table: table, value, is_from_table_edit: false },
|
||||
true
|
||||
);
|
||||
child_fields.push(field);
|
||||
}
|
||||
let submit = null;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ export const genTableEdit = async (
|
|||
parent_table: table,
|
||||
value,
|
||||
on_change: `() => { ext_fm.change(); }`,
|
||||
is_from_table_edit: true
|
||||
},
|
||||
false
|
||||
);
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ const events = {
|
|||
form: {
|
||||
where: async (fm: FMLocal, where: any) => {},
|
||||
before_save: async (fm: FMLocal, record: any) => {},
|
||||
relation_before_save: async (table: string, record: any) => {},
|
||||
after_save: async (fm: FMLocal, record: any) => {},
|
||||
before_load: async (fm: FMLocal) => {},
|
||||
after_load: async (fm: FMLocal) => {},
|
||||
|
|
|
|||
Loading…
Reference in New Issue