How pre-populate collection?

Can’t work this out (if it’s possible). Can’t even decide which end it should be done? (if it’s possible).

Collection definition :

{
	"groups": [{
		"title": "Color Collection",
		"properties": [{
			"title": "Collection",
			"id": "textcolor",
			"format": "text-{{value}}",
			"themeColor": {
				"default": {
					"name": "brand",
					"brightness": 500
				}
			}
		}]
	}]
}

Component user facing control :

{
  "title": "Color Array",
  "property": "textcolor",
  "collection": {
    "identifier": "uk.co.doobox.collections.colors"
  }
}

So like this, when the component is dragged in the collection is empty, and the default on the collection end just defines what the default colour will be of the next addition.

Can it be pre-populated? in this case with say three colours?

Sorry, you can’t pre-populate Collections yet. We have a ticket here for it and we really need to get around to adding it… stay tuned!

2 Likes