The List view works as expected. But the Grid view arranges all items on below the other instead of side by side like in the example.
What am I doing wrong the grid template?
Here my code:
Code: Select all
<pv-dataview :value="exercises" :layout="layout" :paginator="true" :rows="pageSize" :totalRecords="totalCount"
:lazy="true" @page="onPage($event)">
<template #header>
<div class="p-col-6" style="text-align: right">
<pv-dataviewlayoutoptions v-model="layout"/>
</div>
</template>
<template #empty>Keine Einträge gefunden.</template>
<template #list="item">
<sc-exercise-small
:title="item.data.titel"
:image="item.data.previewAsset"
:short-key="item.data.shortKey"
:tags="item.data.tags"
:intensity="item.data.intensity"
:prefered-preview-media="item.data.preferedPreviewMedia "
:show-add-button="true"
:show-open-button="true"
:difficulty="item.data.difficulty"
@AddClicked="onSelected(item)"
/>
/>
</template>
<template #grid="slotProps">
<div class="p-col-12 p-md-4">
<div class="product-grid-item card">
<div class="product-grid-item-top">
<pv-panel :header="slotProps.data.titel" style="text-align: center;width: 200px">
<pv-button icon="pi pi-search"></pv-button>
</pv-panel>
</div>
</div>
</div>
</template>
</pv-dataview>