From 2997c00d6dfd89c7b7caeaf7792aed47cc225188 Mon Sep 17 00:00:00 2001 From: Vasily Zubarev Date: Tue, 8 Apr 2025 22:10:48 +0200 Subject: [PATCH] fix: extra fields renderin in transactions table --- components/transactions/list.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/transactions/list.tsx b/components/transactions/list.tsx index d6a640a..ca8decd 100644 --- a/components/transactions/list.tsx +++ b/components/transactions/list.tsx @@ -200,13 +200,13 @@ export function TransactionList({ transactions, fields = [] }: { transactions: T }) } - const renderFieldInTable = (transaction: Transaction, field: FieldWithRenderer) => { + const renderFieldInTable = (transaction: Transaction, field: FieldWithRenderer): string | React.ReactNode => { if (field.isExtra) { - return transaction.extra?.[field.code as keyof typeof transaction.extra] + return transaction.extra?.[field.code as keyof typeof transaction.extra] ?? "" } else if (field.renderer.formatValue) { return field.renderer.formatValue(transaction) } else { - return transaction[field.code as keyof Transaction] + return String(transaction[field.code as keyof Transaction]) } }