UNPKG

xph-form

Version:

This is a configurable form component that supports React

18 lines (17 loc) 527 B
import { useXphExtendCompProps } from "../common"; const useExtendForm = () => { const { extendProps, extendComp } = useXphExtendCompProps(); const setExtendFormComp = (componentMap) => { const formComp = extendComp?.form; if (formComp) { Object.keys(formComp).forEach((key) => { componentMap.set(key, formComp[key]); }); } }; return { extendFormProps: extendProps?.form, setExtendFormComp, }; }; export default useExtendForm;