react-jsonschema-form
react-jsonschema-form copied to clipboard
i want to add uischema for n times child properties of formschema.
Prerequisites
- [X] I have read the documentation
What theme are you using?
core
Is your feature request related to a problem? Please describe.
formschema:{
"title": "A list of tasks",
"type": "object",
"properties": {
"tasklist": {
"type": "array",
"title": "Addnewtask",
"items": {
"type": "object",
"title": "New Task",
"properties": {
"selectTask": {
"type": "object",
"title": "Enter New Task Detail",
"anyOf": [
{
"title": "Text",
"type": "object",
"properties": {
"TextField": {
"type": "string",
"title": "TEXT",
"default": "TEXT",
"readOnly": true
}
}
},
{
"title": "Text",
"type": "object",
"properties": {
"TextField": {
"type": "string",
"title": "TEXT",
"default": "TEXT",
"readOnly": true,
"hidden": true
}
}
}
]
}
}
}
}
}
}
uiSchema:{
"tasklist": {
"selectTask": {
"TextField": "hidden"
}
}
}
Describe the solution you'd like
how to use uischema to hide child input controls
Describe alternatives you've considered
No response
@gdhelp03 If you read the docs for array and uiSchema you can see that you just have to insert the items property. So this should work for you:
uiSchema:{
"tasklist": {
"items": {
"selectTask": {
"TextField": "hidden"
}
}
}
}
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.
This issue was closed because of lack of recent activity. Reopen if you still need assistance.