easyblocks icon indicating copy to clipboard operation
easyblocks copied to clipboard

Feature: default for component collections

Open timoconnellaus opened this issue 9 months ago • 5 comments

Motivation: In some cases you want to repeat the same item in a component collection over and over. It seems redundant to ask the user each time which component they want - especially when there is only one item in the component collection to choose from

{
  type: "select"
  prop: "type",
  params: {
    options: [{value: "icon-and-text", label: "Icon And Text"}, {value: "text-only", label: "Text"}]
  }
},
{
  type: "component-collection",
  prop: "data",
  label: "List Items",
  accepts: (value) => value.type, // optionally can be dynamically set
  autoPopulate: true // when there is only one value in accepts it will autopopulate
}

timoconnellaus avatar May 20 '24 23:05 timoconnellaus