Array showing only first item (but not in the playground)
Issue type
I'm submitting a (check one): [x] Bug report
Prerequisites
Before posting, make sure you do the following (check all): [x] Confirm you are using the latest versions of all necessary packages (or if not, explain why not) [x] Search GitHub for a similar issue or PR [x] If submitting a Support request, also search [Stack Overflow][stack-overflow] for similar issues Note: Please cross-post GitHub support requests to [Stack Overflow][stack-overflow], and include a link in your GitHub issue to your Stack Overflow question. We do currently respond to support requests on GitHub, but we eventually expect to stop, and will then refer all support questions exclusively to Stack Overflow.
Current behavior
When having a json object with one property being an array,
- only the first item is showed. Differently from issue #195 , no console errors are showed. Moreover,
- after the view is rendered, the ngModel 'data' property is changed so that the array (now) has just one element!
If using the same data, schema and form settings in the playground, everything works.
Expected behavior
When having a json object with one property being an array,
- all array items should be visible
- the ngModel array property should not be updated to an array of length 1!
IMPORTANT: How can we reproduce your problem?
schema:
{
'type': 'object',
'properties': {
'brokers': {
'type': 'array',
'items' : {
'type' : 'object',
'properties' : {
"broker": { 'type': 'string' }
}
}
}
}
};
form
[
{
type: "tabs",
tabs: [
{
title: "Brokers",
type: "array",
startEmpty: false,
items : [
"brokers[].broker"
]
}
]
}
];
{
"brokers": [
{
"broker": "Coincheck",
},
{
"broker": "Bitflyer",
}
]
}
Environment
OS name & version: Windows 10 Browser name & version: Chrome 65.0.3325.181 (official Build) (64 bit) Angular version: 5.2.4 Angular JSON Schema Form version(s): 0.7.0-alpha.1 Other relevant software or packages: Angular/flex-layout : 2.0.0-beta.12 boostrap : 4.0.0