Hi, we’re build our own file section plugin, but the panel dropdown method doesn’t work. The dropdown is still available, but on any click on any option, nothing happend. There is no error in the devcon…
The PHP:
$mediaStore = page( 'mediastore' );
if ( $mediaStore->hasFiles() )
{
$mediaFiles = $mediaStore->files();
foreach ( $mediaFiles->values() as $item )
{
$mediaData[] = [
'id' => $item->id(),
'template' => $item->template(),
'filename' => $item->filename(),
'name' => $item->name(),
'size' => $item->niceSize(),
'preview' => $item->previewUrl(),
'url' => $item->url(),
'options' => $item->panel()->dropdown()
];
}
}
The component:
<k-items layout="cardlets" :items="mediadata">
<template v-slot:default="data">
<k-item
layout="cardlets"
:image="{'back':'pattern','src':data.item.preview}"
:text="data.item.name"
:info="data.item.size"
:key="data.item.id"
:options="data.item.options">
</k-item>
</template>
</k-items>
The result:
But on a click on any option, nothing will happend…
Can anyone help us please?