From 203ef8d8ba62538660158a6c57c9792b0ca3bff6 Mon Sep 17 00:00:00 2001 From: Don McKenzie Date: Fri, 24 Nov 2023 11:44:00 -0500 Subject: [PATCH 1/2] feat: View cell contents in context menu Resolves #1605 --- .../mousehandlers/IrisGridContextMenuHandler.tsx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx index a0c706f7a5..532af5cf3b 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx +++ b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx @@ -79,6 +79,8 @@ class IrisGridContextMenuHandler extends GridMouseHandler { static GROUP_FORMAT = ContextActions.groups.high + 150; + static GROUP_VIEW_CONTENTS = ContextActions.groups.high + 175; + static COLUMN_SORT_DIRECTION = { ascending: 'ASC', descending: 'DESC', @@ -646,6 +648,18 @@ class IrisGridContextMenuHandler extends GridMouseHandler { }); } + actions.push({ + title: 'View Cell Contents', + group: IrisGridContextMenuHandler.GROUP_VIEW_CONTENTS, + order: 10, + action: () => { + irisGrid.setState({ + showOverflowModal: true, + overflowText: irisGrid.getValueForCell(columnIndex, rowIndex) as string, + }); + }, + }); + return actions; } From f6614c6dce55da6116d42651162dc5d92522f2ef Mon Sep 17 00:00:00 2001 From: Don McKenzie Date: Fri, 24 Nov 2023 11:52:10 -0500 Subject: [PATCH 2/2] weird prettier didn't run --- .../src/mousehandlers/IrisGridContextMenuHandler.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx index 532af5cf3b..5833f4096b 100644 --- a/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx +++ b/packages/iris-grid/src/mousehandlers/IrisGridContextMenuHandler.tsx @@ -655,7 +655,10 @@ class IrisGridContextMenuHandler extends GridMouseHandler { action: () => { irisGrid.setState({ showOverflowModal: true, - overflowText: irisGrid.getValueForCell(columnIndex, rowIndex) as string, + overflowText: irisGrid.getValueForCell( + columnIndex, + rowIndex + ) as string, }); }, });