N
Nuxt7mo ago
isakwang

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
isakwang
isakwangOP7mo ago
This doesn't work either <UBadge :color="row.status === Pending ? yellow : green" :label="row.status" /> That was the solution. Thanks!
Want results from more Discord servers?
Add your server