fix: load schema not working (#919)

Reviewed-on: daoyoucloud/tachybase#919
This commit is contained in:
sealday 2024-05-07 16:09:05 +08:00
parent a596a8ee8d
commit 330b8b13da

View File

@ -57,7 +57,9 @@ export const defaultSettingItems = [
const api = useAPIClient();
const fieldSchema = useFieldSchema();
const dn = useMemo(() => {
return createDesignable({ t, api, refresh, current: fieldSchema.parent });
const dn = createDesignable({ t, api, refresh, current: fieldSchema.parent });
dn.loadAPIClientEvents();
return dn;
}, [t, api, refresh, fieldSchema]);
return {
@ -86,7 +88,6 @@ export const defaultSettingItems = [
});
const s = data ?? {};
dn.insertBeforeEnd(s);
dn.refresh();
},
};
},