Custom Field Preview Plugin stopped working after Kirby upgrade (3.8)

hey there beings :upside_down_face: :sparkles:

i am kinda stuck with a custom panel field preview plugin for structure fields. i was on 3.7.3 before and upgraded to 3.8.2. and the plugin stopped working.

i have a structure field that includes a multiselect field. the multiselect field is using a custom query to get a collection of pages. what i need is the ability to add html to the structure preview of the multiselect field in order to show the page name in regular color and description in another color.

when comparing kirby versions, if i log the props value in the console, i see that the output is totally different. before, it included an array consisting of both text and value. now, it includes a string of only the value.

based on that, it’s clear why my plugin doesn’t work anymore, as entry.text doesn’t exist in the new version. something in kirby’s core must have changed but i can’t figure out what, nor how to adapt my code.


this is my custom field preview:

'k-multiselect-field-preview': {

    props: {
        value: String
    },

    beforeMount() {
        console.log(this.value);
    },

    template:
        `
        <div class="k-multiselect-field-preview">
            <div class="multiselect-entries">
                <span v-for="entry in value" class="multiselect-entry" v-html="entry.text"></span>
            </div>
        </div>
        `
},

here is how it rendered in 3.7.3:


here is how it renders in 3.8.2:


the multiselect field itself still works fine on 3.8.2 w/o problems:


if there’s anyone who could help, i would appreciate that a lot.
thank you so much!
jaro
:blossom:

I’ve posted a solution here.