From 60169a761d5c98821e4f1bf6488a3c2e30188778 Mon Sep 17 00:00:00 2001 From: Aurelio Saraiva Date: Wed, 18 Aug 2021 19:34:16 -0300 Subject: [PATCH] renamed function to customTitle Signed-off-by: Aurelio Saraiva --- plugins/techdocs/src/home/components/columns.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/techdocs/src/home/components/columns.tsx b/plugins/techdocs/src/home/components/columns.tsx index 80dfd80a35..b7ec8271a4 100644 --- a/plugins/techdocs/src/home/components/columns.tsx +++ b/plugins/techdocs/src/home/components/columns.tsx @@ -17,9 +17,10 @@ import React from 'react'; import { Link, SubvalueCell, TableColumn } from '@backstage/core-components'; import { EntityRefLinks } from '@backstage/plugin-catalog-react'; +import { Entity } from '@backstage/catalog-model'; import { DocsTableRow } from './types'; -function formatTitle(entity): String { +function customTitle(entity: Entity): String { return entity.metadata.title || entity.metadata.name; } @@ -30,7 +31,7 @@ export function createNameColumn(): TableColumn { highlight: true, render: (row: DocsTableRow) => ( {formatTitle(row.entity)}} + value={{customTitle(row.entity)}} subvalue={row.entity.metadata.description} /> ),