Commit 1acb3955 authored by Boris Kocherov's avatar Boris Kocherov

use `required` property for array items

parent 4d093c6c
...@@ -142,6 +142,7 @@ ...@@ -142,6 +142,7 @@
} }
return form_gadget.renderForm({ return form_gadget.renderForm({
type: options.type, type: options.type,
required: options.required,
schema: options.schema_part, schema: options.schema_part,
schema_path: options.schema_path, schema_path: options.schema_path,
document: options.default_dict, document: options.default_dict,
...@@ -495,7 +496,8 @@ ...@@ -495,7 +496,8 @@
parent_type: 'array', parent_type: 'array',
schema_path: schema_path + '/items', schema_path: schema_path + '/items',
schema_part: schema_arr, schema_part: schema_arr,
default_dict: json_document[i] default_dict: json_document[i],
required: i < minItems
}) })
) )
.push(div_append); .push(div_append);
...@@ -511,7 +513,8 @@ ...@@ -511,7 +513,8 @@
gadget: gadget, gadget: gadget,
parent_type: 'array', parent_type: 'array',
schema_path: schema_arr[0].schema_path, schema_path: schema_arr[0].schema_path,
schema_part: schema_arr[0].schema schema_part: schema_arr[0].schema,
required: true
}) })
) )
.push(div_append); .push(div_append);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment