react-json-schema-form-extras icon indicating copy to clipboard operation
react-json-schema-form-extras copied to clipboard

Dynamic title for Collapsible

Open LukasB79 opened this issue 6 years ago • 4 comments

Do you plan support for dynamic titles for collapsible fields of array types ? For example title could be one of the property of array item:

items.title = items.properties.title.value

For now it only shows same title for all items "itemsTitle" and so it is not so readable in collapsed state

const schema = {
  type: "object",
  properties: {
    arrayField:{
      type: "array",
      items: {
        type: "object",
        title: "itemsTitle",
        properties: {
          title: { type: "string" },
          number: { type: "number" }
        }
      }
    }
  }
}

const uiSchema = {
  arrayField: {
    items: {
      "ui:field": "collapsible",
      collapse: {
        field: "ObjectField"
      }
    }
  }
}

live demo

LukasB79 avatar Oct 18 '18 08:10 LukasB79

I would also like to use this feature - is there anyway to accomplish this?

shortwavedave avatar Jul 23 '19 13:07 shortwavedave

I am also looking to dynamically label collapsible field titles. Any suggestings would be greatly appreciated.

trdunbar avatar Sep 12 '19 12:09 trdunbar

Any Solution I am looking for this too?

vxb1766 avatar Feb 24 '22 04:02 vxb1766

Any Solution I am looking for this too?

No, not that I am aware of.

trdunbar avatar Feb 24 '22 21:02 trdunbar