Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How generate recursive form field from Schema? $ref has no effect on form. #9

Open
riddhi-adhvaryu opened this issue Mar 4, 2020 · 0 comments

Comments

@riddhi-adhvaryu
Copy link

I am trying to generate a form which can have multiple recursive fields. I have used https://codepen.io/crickford/pen/ZmJqwd this demo (I am not using any custom component). Whenever i am using "$ref" it ignores it.

My Json-schema is valid. Even if i replace the following schema in codepen i don't get expected result, where as it is giving me by editing schema property of the source in this link http://www.alpacajs.org/docs/api/recursive-references.html

I don't know where am I mistaking !! At least in codepen attached schema code should work.
Kindly guide me or share working demo fiddle with me. Thanks in advance.

Here is my schema:
{ "type": "object", "title": "", "properties": { "Namespace": { "type": "string", "title": "Namespace ", "attrs": { "placeholder": "Namespace", "title": "Please enter Namespace" } }, "Name": { "type": "string", "title": "Display Name : ", "attrs": { "placeholder": "Display Name", "title": "Please enter Display name" } }, "SubSteps": { "type": "array", "title": "SubSteps", "items": { "type": "object", "title": "Sub step", "$ref": "#/definitions/SubSteps" } } }, "definitions": { "SubSteps": { "type": "object", "title": "SubStep item", "properties": { "Namespace": { "type": "string", "title": "Namespace ", "attrs": { "placeholder": "Namespace", "title": "Please enter Namespace" } }, "Name": { "type": "string", "title": "Display Name : ", "attrs": { "placeholder": "Display Name", "title": "Please enter Display name" } }, "SubSteps": { "type": "array", "title": "SubSteps", "items": { "type": "object", "title": "Sub step", "$ref": "#/definitions/SubSteps" } } } } }, "required": [ "Name" ] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant