koumoul-dev / vuetify-jsonschema-form

Create beautiful and low-effort forms that output valid data. Published on npm as @koumoul/vjsf.
https://koumoul-dev.github.io/vuetify-jsonschema-form/latest/
MIT License
546 stars 155 forks source link

Slots with a prefix matching the key of the property don't work with allOf #254

Closed sebastianroller closed 1 month ago

sebastianroller commented 3 years ago

Hi, first of all thank you for the great library! Unfortunately I encountered a problem with slots that have prefix matching the key of the property. They work well when the properties are on the first level of the schema. But with allOf on the first level the slots are not rendered anymore. Example:

<v-jsf v-model="model" :schema="schema" :options="options">
  <template slot="stringProp3-before" slot-scope="slotProps">
    Hello
  </template>
</v-jsf>

const schema = {
  type: 'object',
  "allOf": [{
      "title": "I'm a subsection",
      "properties": {
        "stringProp3": {
          "type": "string",
          "title": "I'm a property in subsection 2.1"
        }
      }
    },
    {
      "title": "I'm another subsection",
      "properties": {
        "stringProp4": {
          "type": "string",
          "title": "I'm a property in subsection 2.2"
        }
      }
    }
  ]
}

Could you please help me with this issue?