I am struggling to display a v-icon conditionally in a v-data-table within Vuetify 3, based on a value of either 1 or 0. In Vuetify 2, there were multiple easy ways to achieve this, but it's not rendering in the latest version.
I want to show v-icons in Vuetify 3 based on a condition using v-if and v-else. I have tried various methods (v-if, v-if [it works in Vuetify 2])... thank you in advance
<v-data-table
:items-per-page="itemsPerPage"
:headers="headers"
:items="items"
class="elevation-1"
:search="search"
dense
>
<template v-slot:items.active="{ item }">
<v-icon v-if="item.active == 1" size="small"
>mdi-pencil </v-icon
>
<v-icon v-else size="small"
>mdi-delete</v-icon
>
</template>
</v-data-table>