在Mozilla react-jsonschema-form中对嵌套元素进行排序

时间:2017-03-30 16:22:48

标签: forms reactjs mozilla

在父母和子女都需要订购时,有没有办法在嵌套元素上创建UI顺序?

例如:

在操场上的嵌套示例中,如果我不得不在任务 - > title之前获得任务和title以及任务 - >详细信息,并且如果title还有必须订购的mainTitle和subTitle,有人可以举个例子吗?

JSON架构:

{ "title": "A list of tasks", "type": "object", "required": [ "title" ], "properties": { "title": { "type": "string", "title": "Task list title" }, "tasks": { "type": "array", "title": "Tasks", "items": { "type": "object", "required": [ "title" ], "properties": { "title": { "type": "object", "required": [ "main" ], "properties": { "main": { "type": "string", "description": "Enter the main title" }, "subtitle": { "type": "string", "description": "Enter the subtitle" } } }, "details": { "type": "string", "title": "Task details", "description": "Enter the task details" }, "done": { "type": "boolean", "title": "Done?", "default": false } } } } } }

FORMDATA:

{ "title": "My current tasks", "tasks": [ { "title": { "main": "main title" }, "details": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.", "done": true }, { "title": { "main": "main title" }, "details": "Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur", "done": false } ] }

0 个答案:

没有答案