MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / FieldControl

Function FieldControl

web/pgadmin/static/js/SchemaView/FieldControl.jsx:12–26  ·  view source on GitHub ↗
({schemaId, item})

Source from the content-addressed store, hash-verified

10import { useMemo } from 'react';
11
12export 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};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected