({schemaId, item})
| 10 | import { useMemo } from 'react'; |
| 11 | |
| 12 | export const FieldControl = ({schemaId, item}) => { |
| 13 | const Control = item.control; |
| 14 | const {key, ...props} = item.controlProps; |
| 15 | const children = item.controls; |
| 16 | |
| 17 | return useMemo(() => |
| 18 | <Control key={key} {...props}> |
| 19 | { |
| 20 | children?.map( |
| 21 | (child, idx) => <FieldControl key={`${child.controlProps.id}-${idx}`} item={child}/> |
| 22 | ) |
| 23 | } |
| 24 | </Control>, [schemaId, Control, props, children] |
| 25 | ); |
| 26 | }; |
nothing calls this directly
no outgoing calls
no test coverage detected