diff --git a/web/sdk/admin/views/organizations/details/tokens/columns.tsx b/web/sdk/admin/views/organizations/details/tokens/columns.tsx index c9f78f3e0..721822f73 100644 --- a/web/sdk/admin/views/organizations/details/tokens/columns.tsx +++ b/web/sdk/admin/views/organizations/details/tokens/columns.tsx @@ -7,6 +7,7 @@ import { Flex, getAvatarColor, Text, + Tooltip, } from "@raystack/apsara"; import type { SearchOrganizationTokensResponse_OrganizationToken, @@ -29,6 +30,7 @@ export const getColumns = (): DataTableColumnDef< cell: styles["first-column"], header: styles["first-column"], }, + styles: { header: { width: "180px" } }, cell: ({ getValue }) => { const value = getValue() as TimeStamp; const date = isNullTimestamp(value) @@ -43,6 +45,7 @@ export const getColumns = (): DataTableColumnDef< { accessorKey: "amount", header: "Tokens", + styles: { header: { width: "220px" } }, cell: ({ row, getValue }) => { const prefix = row.original.type === "credit" ? "+" : "-"; const value = getValue() as number; @@ -55,8 +58,15 @@ export const getColumns = (): DataTableColumnDef< { accessorKey: "description", header: "Events", + classNames: { cell: styles["truncate-tooltip-wrapper"] }, cell: ({ getValue }) => { - return getValue(); + const text = (getValue() as string) ?? ""; + if (!text) return text; + return ( + + {text} + + ); }, enableHiding: true, }, diff --git a/web/sdk/admin/views/organizations/details/tokens/tokens.module.css b/web/sdk/admin/views/organizations/details/tokens/tokens.module.css index 3fc52a098..11cd46935 100644 --- a/web/sdk/admin/views/organizations/details/tokens/tokens.module.css +++ b/web/sdk/admin/views/organizations/details/tokens/tokens.module.css @@ -26,3 +26,15 @@ .first-column { padding-left: var(--rs-space-7); } + +/* Target Tooltip's root element (direct child of wrapper) – constrains width so inner text can truncate */ +.truncate-tooltip-wrapper>* { + width: 100%; +} + +.truncate-text { + display: block; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} \ No newline at end of file