Create array object, it's only valid when schema.type="array"
.
Layout
Array layout is divided into array itself and array element layout, arraySpan
determines the number of grid of each array element.
UI embed in Schema:
const schema = {
list: {
type: 'array',
items: {
a: { type: 'string' },
b: { type: 'number', ui: { spanLabel: 10 } }
},
ui: { spanLabel: 5, grid: { arraySpan: 12 } }
}
};
Note: All attributes in items
are inherited from list.ui
, eventually, items.a
has 5
units, items.b
has 10
units.
Schema and UI are separated, above UI configuration will be converted to:
const ui = {
$list: {
$items: {
$b: { spanLabel: 10 }
},
spanLabel: 5,
grid: { arraySpan: 12 }
}
};