From 0bd6c57972d4a560f2d48de2d35e076b11e0fae7 Mon Sep 17 00:00:00 2001 From: Ihor Dykhta Date: Sat, 1 Mar 2025 20:58:25 +0200 Subject: [PATCH] fix warnings for cell missing style Signed-off-by: Ihor Dykhta --- src/components/src/common/data-table/header-cell.tsx | 1 + src/components/src/common/data-table/index.tsx | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/components/src/common/data-table/header-cell.tsx b/src/components/src/common/data-table/header-cell.tsx index af356e44d3..fca2c86880 100644 --- a/src/components/src/common/data-table/header-cell.tsx +++ b/src/components/src/common/data-table/header-cell.tsx @@ -91,6 +91,7 @@ type HeaderCellProps = { props: DataTableProps; toggleMoreOptions: (moreOptionsColumn: string) => void; moreOptionsColumn: null | string; + style: CSSProperties; }; const HeaderCellFactory = (FieldToken: React.FC) => { diff --git a/src/components/src/common/data-table/index.tsx b/src/components/src/common/data-table/index.tsx index 75d7b3156f..4a034cb0dc 100644 --- a/src/components/src/common/data-table/index.tsx +++ b/src/components/src/common/data-table/index.tsx @@ -404,6 +404,8 @@ interface DataTableState { showStats?: boolean; } +const DUMMY_STYLE = {}; + DataTableFactory.deps = [HeaderCellFactory]; function DataTableFactory( HeaderCell: ReturnType @@ -550,6 +552,8 @@ function DataTableFactory( props={props} toggleMoreOptions={toggleMoreOptions} moreOptionsColumn={moreOptionsColumn} + // pass dummy style to prevent warnings from react-virtualized Grid + style={DUMMY_STYLE} /> ); return HeaderCellRenderer;