MCPcopy
hub / github.com/vantezzen/autoform / ObjectField

Function ObjectField

packages/react/src/ObjectField.tsx:9–26  ·  view source on GitHub ↗
({ field, path })

Source from the content-addressed store, hash-verified

7 field: ParsedField;
8 path: string[];
9}> = ({ field, path }) => {
10 const { uiComponents } = useAutoForm();
11
12 return (
13 <uiComponents.ObjectWrapper
14 label={getLabel(field)}
15 field={field}
16 >
17 {Object.entries(field.schema!).map(([_key, subField]) => (
18 <AutoFormField
19 key={`${path.join(".")}.${subField.key}`}
20 field={subField}
21 path={[...path, subField.key]}
22 />
23 ))}
24 </uiComponents.ObjectWrapper>
25 );
26};

Callers

nothing calls this directly

Calls 2

useAutoFormFunction · 0.90
getLabelFunction · 0.90

Tested by

no test coverage detected