From ab6b2a81f2cabbc7f455205854f45bf3a12914ed Mon Sep 17 00:00:00 2001 From: cchaos Date: Tue, 8 Mar 2022 14:23:27 -0500 Subject: [PATCH] Dont expand empty buttons --- .../data_grid_cell.test.tsx.snap | 70 ++++++++++--------- .../body/data_grid_cell_actions.test.tsx | 65 +++++++++-------- .../datagrid/body/data_grid_cell_actions.tsx | 20 +++--- 3 files changed, 84 insertions(+), 71 deletions(-) diff --git a/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap b/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap index f44c7d44ea89..e8f2afac7be9 100644 --- a/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap +++ b/src/components/datagrid/body/__snapshots__/data_grid_cell.test.tsx.snap @@ -1,5 +1,41 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`EuiDataGridCell componentDidUpdate handles the cell popover by forwarding the cell's DOM node and contents to the parent popover context 1`] = ` +Array [ +
+
+ + +
+
, +
+
+
+
+
+
+
+
, +] +`; + exports[`EuiDataGridCell renders 1`] = ` `; - -exports[`EuiDataGridCell componentDidUpdate handles the cell popover by forwarding the cell's DOM node and contents to the parent popover context 1`] = ` -Array [ -
-
- - -
-
, -
-
-
-
-
-
, -] -`; diff --git a/src/components/datagrid/body/data_grid_cell_actions.test.tsx b/src/components/datagrid/body/data_grid_cell_actions.test.tsx index c07fa9b7d931..325299892c5e 100644 --- a/src/components/datagrid/body/data_grid_cell_actions.test.tsx +++ b/src/components/datagrid/body/data_grid_cell_actions.test.tsx @@ -147,13 +147,15 @@ describe('EuiDataGridCellPopoverActions', () => { - +
+ +
@@ -193,42 +195,49 @@ describe('EuiDataGridCellPopoverActions', () => { - +
+ +
- +
+ +
- +
+ +
diff --git a/src/components/datagrid/body/data_grid_cell_actions.tsx b/src/components/datagrid/body/data_grid_cell_actions.tsx index fc0e1aee23ba..8773b1c519d5 100644 --- a/src/components/datagrid/body/data_grid_cell_actions.tsx +++ b/src/components/datagrid/body/data_grid_cell_actions.tsx @@ -119,15 +119,17 @@ export const EuiDataGridCellPopoverActions = ({ >; return ( - ( - - )} - isExpanded={true} - /> +
+ ( + + )} + isExpanded={true} + /> +
); },