From 8386021db2c84712c1f50b562676f68bb5829bcc Mon Sep 17 00:00:00 2001 From: Rizky Date: Thu, 4 Jul 2024 00:03:53 -0700 Subject: [PATCH] fix form --- comps/form/Form.tsx | 5 +++++ comps/form/typings.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/comps/form/Form.tsx b/comps/form/Form.tsx index 84a921b..53bf4b2 100755 --- a/comps/form/Form.tsx +++ b/comps/form/Form.tsx @@ -56,6 +56,11 @@ export const Form: FC = (props) => { field: null, }, }); + + if (props.render_parent) { + fm.render = props.render_parent; + } + useEffect(() => { // deteksi jika ada softdelete if (Array.isArray(props.feature)) { diff --git a/comps/form/typings.ts b/comps/form/typings.ts index 3284a37..334455e 100755 --- a/comps/form/typings.ts +++ b/comps/form/typings.ts @@ -19,6 +19,7 @@ export type FMProps = { on_load_deps?: any[]; feature?: any[]; sfd_field?: any; + render_parent?: () => void; }; export type GenField =