From 5e3e57eb48924b247da0f98c59f7a44adea14375 Mon Sep 17 00:00:00 2001 From: Eduard Heimbuch Date: Tue, 3 Dec 2019 09:37:52 +0100 Subject: [PATCH] fix ts error --- scm-ui/ui-components/src/table/Table.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scm-ui/ui-components/src/table/Table.tsx b/scm-ui/ui-components/src/table/Table.tsx index a41ad84d5a..c89c72e89e 100644 --- a/scm-ui/ui-components/src/table/Table.tsx +++ b/scm-ui/ui-components/src/table/Table.tsx @@ -65,8 +65,6 @@ const Table: FC = ({ data, sortable, children }) => { setlastSortBy(index); }; - // @ts-ignore - const { header } = child.props; return ( tableData.length > 0 && ( @@ -79,7 +77,10 @@ const Table: FC = ({ data, sortable, children }) => { onMouseEnter={() => setHoveredColumnIndex(index)} onMouseLeave={() => setHoveredColumnIndex(undefined)} > - {header} + { + // @ts-ignore + child.props.header + } {isSortable(child) && renderSortIcon(child, ascending, index === lastSortBy || index === hoveredColumnIndex)}