From 6d53fc76c84291e57f33d55cb1f211bfb63b9f19 Mon Sep 17 00:00:00 2001 From: Michal Klobukowski Date: Thu, 14 Jun 2018 14:23:31 +0200 Subject: [PATCH] Make data-explorer onItemClick prop optional Feature #13601 Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski --- src/components/data-explorer/data-explorer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/data-explorer/data-explorer.tsx b/src/components/data-explorer/data-explorer.tsx index 9090bff2..f24d344c 100644 --- a/src/components/data-explorer/data-explorer.tsx +++ b/src/components/data-explorer/data-explorer.tsx @@ -11,7 +11,7 @@ export interface DataExplorerProps { items: T[]; columns: Array>; onColumnToggle: (column: Column) => void; - onItemClick: (item: T) => void; + onItemClick?: (item: T) => void; } class DataExplorer extends React.Component & WithStyles> { @@ -38,7 +38,7 @@ class DataExplorer extends React.Component & WithStyles< { items.map((item, index) => ( - onItemClick(item)}> + onItemClick && onItemClick(item)}> { columns.filter(column => column.selected).map((column, index) => ( -- 2.30.2