Creating custom hidden field

I’m trying to create new hidden field, but getting error:

Neither template or render method provided nor extending a component when loading plugin component “k-custom-field”. The component has not been registered.

index.php

Kirby::plugin('afbora/custom', [
    'fields' => [
        'custom' => [
            'computed' => [
                'value' => function () {
                    $value = $this->value;

                    if (empty($value) === true) {
                        $value = uniqid();
                    }

                    return $value;
                }
            ]
        ]
    ]
]);

index.js

panel.plugin("afbora/custom", {
    fields: {
        custom: {
            template: ''
        }
    }
});

Shouldn’t it be:

panel.plugin("afbora/custom", {
  fields: {
    custom: {
      extends: "k-hidden-field"
    }
  }
});

At least if you want to extend it…

If not, looks like you have to provide some HTML at least

panel.plugin("afbora/custom", {
  fields: {
    custom: {
      template: "<p></p>"
    }
  }
});

Both leave a gap. I don’t want any space, is that possible?

Looks like the the original hidden field doesn’t have it’s own Vue component and doesn’t show up in the DOM at all. But for all fields but the hidden field, the k-column div is created, see FieldSet.Vue:

<k-column
        v-for="(field, fieldName) in fields"
        v-if="field.type !== 'hidden' && meetsCondition(field)" 
        :key="field.signature"
        :width="field.width"
      >