perak / kitchen-site

Meteor Kitchen site source code
MIT License
282 stars 38 forks source link

collection2 and crud objects for arrays #96

Open solace opened 9 years ago

solace commented 9 years ago

Hi,

(Edit: Rephrasing the problem, to include more detail)

I know collection2 is experimental at the moment. But for a field defined as:

{
    "name": "array_field",
    "title": "Array Field",
    "type": "array",
    "array_item_type": "object",
    "input": "crud",
    "crud_fields": [ ... ]
}

The input json generates SimpleSchema fields containing:

array_field: {
    label: "Array Field",
    type: [Object],
    blackbox: true,
    optional: true
}

The forms appear to work but it lacks the detail in the schema.

Also, collection2 shows array of object definitions to also include sub-field definitions in the schema keyed by dot notation, eg. array_field.$.sub_field. But none of these have been generated.

Perhaps also update array_item_type to also support composition of other schemas/collections (eg. "array_item_type": "other_collections" or "array_item_type": "Schema.OtherCollections") which can be also be edited via the same crud table mechanism.

perak commented 9 years ago

Thanks! :+1: