wotamann / vuetify-form-base

Schema-based Form Generator - Vue.js 2.0 Component based on Vuetify 2.0
https://wotamann.github.io/vuetify
231 stars 63 forks source link

Dynamic label text when using array #77

Open Mohammad-Alavi opened 3 years ago

Mohammad-Alavi commented 3 years ago

First of all thank you for your awesome work on this package 🥇

How can we dynamically set the label text when using an array?

Here is an example:

'pages': {
        'type': 'array',
        'col': 12,
        'schema': {
              'title': {
                   type: 'wrap',
                   label: <================= Here
                   'col': 12,
                   'schema': {
                         ....
                   }
              },
        }
},

Look at "label" How can we get the current item so we can use it's properties as the label text? e.g. : label: val => val.title or something like that?

wotamann commented 3 years ago

Hello, thank you for your inquiry!

It is currently not possible to access an array item or the index in this way. But give me some time, I will think about whether this is possible.