From e58951b46ebf22a97548c6e3237c2d126f507133 Mon Sep 17 00:00:00 2001 From: Bhanu Prakash Sai Potteri Date: Fri, 22 May 2026 23:19:34 +0530 Subject: [PATCH] Render phone object as phone_with_dial_code in recordview cells --- src/components/RecordViewTable.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/RecordViewTable.tsx b/src/components/RecordViewTable.tsx index 2ab92f2..cafc97e 100644 --- a/src/components/RecordViewTable.tsx +++ b/src/components/RecordViewTable.tsx @@ -521,6 +521,11 @@ function buildPageRange(current: number, total: number): Array { function renderCell(value: unknown, dataType: string, fieldKey: string): React.ReactNode { if (value == null || value === "") return ; if (fieldKey === "current_state_name") return ; + if (dataType === "phone" && typeof value === "object") { + const p = value as { phone_with_dial_code?: string; phone?: string; dial_code?: string }; + const text = p.phone_with_dial_code || (p.dial_code && p.phone ? `${p.dial_code}${p.phone}` : p.phone || ""); + return text ? {text} : ; + } if (dataType === "number") { const n = Number(value); if (fieldKey.includes("amount") || fieldKey.includes("Amount") || fieldKey.includes("tax") || fieldKey.includes("price"))