Can't set up k-pages-field in Block preview (this.endpoints.field error)

Do you know about the fields-block plugin?
If you’re just trying to “show the fieldset as the preview”, this might already do what you want. :slight_smile:

If you instead just want to show one of the page fields in your block fieldset, you might be able to just pass the <k-pages-field> components all its props by getting them from the panel:

<k-pages-field v-bind="field('pages-field-name')" />

All block previews, when registered via:

panel.plugin('my/plugin', {
  blocks: {
    // here
  }
})

Inherit some helper functions from the k-block-type component. One of that is the field(name, fallback) function which gives you the definition of a field in the block’s fieldset by name.

I haven’t actually tried the code above, but I think it could work. :slight_smile:


Otherwise try to console.log the field('pages-field-name') return value and see if the props are somewhere in there.