This commit is contained in:
rizky 2024-08-07 04:55:49 -07:00
parent 02564d8710
commit ab03212230
2 changed files with 8 additions and 24 deletions

View File

@ -87,23 +87,14 @@ export const TypeDropdown: FC<{
}); });
}; };
if ((arg.load_trigger?.deps || []).length > 0 && !isEditor) { useEffect(() => {
useEffect( if (isEditor) {
() => { local.loaded = true;
reload(); local.render();
}, return;
arg.load_trigger?.deps.map((e) => fm.data[e]) }
); reload();
} else { }, []);
useEffect(() => {
if (isEditor) {
local.loaded = true;
local.render();
return;
}
reload();
}, []);
}
let value = let value =
typeof arg.opt_get_value === "function" typeof arg.opt_get_value === "function"

View File

@ -48,13 +48,6 @@ export type FieldProp = {
label: string; label: string;
desc?: string; desc?: string;
props?: any; props?: any;
load_trigger?: {
deps: any[];
on_change: (arg: {
fm: FMLocal;
where: any;
}) => Promise<{ where?: any; result?: any[] }>;
};
link: { link: {
text: text:
| string | string