react-jsonschema-form icon indicating copy to clipboard operation
react-jsonschema-form copied to clipboard

Passing custom props with cloneElement from custom ObjectFieldTemplate

Open MrDelik opened this issue 3 years ago • 1 comments

Prerequisites

Description

When using a custom ObjectFieldTemplate, I want to clone the properties to pass custom props to the chidlren. The problem is that the SchemaField do not pass added props to the children.

Steps to Reproduce

  1. Creating a custom ObjectFieldTemplate
  2. Cloning each properties content with custom props
  3. Rendering cloned properties

Expected behavior

Having the custom properties in the clones

Actual behavior

The custom properties are passed to the SchemaField, but not to SchemaFIeld children

Version

3.2.0

MrDelik avatar Nov 04 '21 10:11 MrDelik

@MrDelik what about modifying your custom ObjectFieldTemplate to insert these custom props into a copy of the uiSchema object that IS guaranteed to be passed down to the widgets?

heath-freenome avatar Aug 22 '22 23:08 heath-freenome

This issue has been automatically marked as possibly close because it has not had recent activity. It will be closed if no further activity occurs. Please leave a comment if this is still an issue for you. Thank you.

stale[bot] avatar Nov 22 '23 07:11 stale[bot]

This issue was closed because of lack of recent activity. Reopen if you still need assistance.

stale[bot] avatar Dec 22 '23 11:12 stale[bot]