V-if not working
I have this set of if statements, but they aren't executing properly. I have tried both row.status and row.status.value but the former returns the value without the component and the latter returns the first statement even though the value is Completed.
What am i doing wrong?
<template #status-data="{ row }">
<UBadge
v-if="row.status == Pending"
color="yellow"
:label="row.status"
/>
<UBadge
v-else-if="row.status == Completed"
color="green"
:label="row.status"
/>
1 Reply
This doesn't work either
<UBadge
:color="row.status === Pending ? yellow : green"
:label="row.status"
/>
That was the solution. Thanks!