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(
() => {
reload();
},
arg.load_trigger?.deps.map((e) => fm.data[e])
);
} else {
useEffect(() => {
if (isEditor) {
local.loaded = true;
local.render();
return;
}
reload();
}, []);
}
useEffect(() => {
if (isEditor) {
local.loaded = true;
local.render();
return;
}
reload();
}, []);
let value =
typeof arg.opt_get_value === "function"

View File

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