Skip to content

Commit

Permalink
feat(react): support x-component-props.children
Browse files Browse the repository at this point in the history
  • Loading branch information
janryWang committed May 26, 2021
1 parent 09ec8e5 commit c817638
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/react/src/components/RecursionField.tsx
Expand Up @@ -24,9 +24,10 @@ export const RecursionField: React.FC<IRecursionFieldProps> = (props) => {
...scope,
})
}, [schema])
const fieldProps = useMemo(() => fieldSchema?.toFieldProps(options) as any, [
fieldSchema,
])
const fieldProps = useMemo(
() => fieldSchema?.toFieldProps(options) as any,
[fieldSchema]
)
const getBasePath = () => {
if (props.onlyRenderProperties) {
return props.basePath || parent?.address.concat(props.name)
Expand Down Expand Up @@ -90,6 +91,7 @@ export const RecursionField: React.FC<IRecursionFieldProps> = (props) => {
return (
<Field {...fieldProps} name={props.name} basePath={basePath}>
{fieldSchema['x-content']}
{fieldSchema['x-component-props']?.['children']}
</Field>
)
}
Expand Down

0 comments on commit c817638

Please sign in to comment.