react-jsonschema-form
react-jsonschema-form copied to clipboard
`pathSchema` prop in templates
Prerequisites
- [X] I have read the documentation
What theme are you using?
core
Is your feature request related to a problem? Please describe.
Is it possible to get the current pathSchema in templates similar to how you get the current idSchema?
For example, in a template, if the idSchema prop is "root_x_y_z" then the pathSchema prop would be "x.y.z".
Describe the solution you'd like
I'd like pathSchema as a prop provided to all template components.
Describe alternatives you've considered
No response
@jroebu14 using the idSchema, you can extract the path fairly simply by setting the idSeparator prop on the Form to be . and then slicing out the root.
@jroebu14 using the idSchema, you can extract the path fairly simply by setting the idSeparator prop on the Form to be . and then slicing out the root.
@heath-freenome this is a good solution. I'll go with this. Thanks very much!