From 41ab3a7cf1ce7d3e053102090e91d3984a6697c1 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 16 Nov 2020 11:50:42 +0100 Subject: [PATCH 1/3] Fix wrong columns assigned to leadColumns --- src/components/datagrid/data_grid_data_row.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/datagrid/data_grid_data_row.tsx b/src/components/datagrid/data_grid_data_row.tsx index 6ebb7b4eadc..6c882aa52db 100644 --- a/src/components/datagrid/data_grid_data_row.tsx +++ b/src/components/datagrid/data_grid_data_row.tsx @@ -93,7 +93,7 @@ const EuiDataGridDataRow: FunctionComponent = memo( visibleRowIndex={visibleRowIndex} colIndex={i} columnId={id} - column={columns[i]} + column={leadingColumn} popoverContent={DefaultColumnFormatter} width={leadingColumn.width} renderCellValue={rowCellRender} From 11700a9bdfe4953bb8f901830d01f09b9de6d0fd Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Wed, 18 Nov 2020 18:16:58 +0100 Subject: [PATCH 2/3] Add to CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c2e4b9f88a6..692539767c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ No public interface changes since `30.4.0`. +*Bug fixes** + +- Fixed wrong columns assigned to `EuiDataGrid` leadingControlColumns ([#4269](https://github.com/elastic/eui/pull/4269)) + ## [`30.4.0`](https://github.com/elastic/eui/tree/v30.4.0) - Added `eql` glyph in `EuiIcon` ([#4110](https://github.com/elastic/eui/pull/4110)) From fd4367d172ddcc3b01a660eae4ae0d10ab9265b7 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Fri, 20 Nov 2020 17:27:26 +0100 Subject: [PATCH 3/3] Fix trailing columns --- src/components/datagrid/data_grid_data_row.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/datagrid/data_grid_data_row.tsx b/src/components/datagrid/data_grid_data_row.tsx index 6c882aa52db..a29b19fb9c3 100644 --- a/src/components/datagrid/data_grid_data_row.tsx +++ b/src/components/datagrid/data_grid_data_row.tsx @@ -136,8 +136,8 @@ const EuiDataGridDataRow: FunctionComponent = memo( /> ); })} - {trailingControlColumns.map((leadingColumn, i) => { - const { id, rowCellRender } = leadingColumn; + {trailingControlColumns.map((trailingColumn, i) => { + const { id, rowCellRender } = trailingColumn; const colIndex = i + columns.length + leadingControlColumns.length; return ( @@ -147,9 +147,9 @@ const EuiDataGridDataRow: FunctionComponent = memo( visibleRowIndex={visibleRowIndex} colIndex={colIndex} columnId={id} - column={columns[colIndex]} + column={trailingColumn} popoverContent={DefaultColumnFormatter} - width={leadingColumn.width} + width={trailingColumn.width} renderCellValue={rowCellRender} onCellFocus={onCellFocus} isFocused={focusedCellPositionInTheRow === colIndex}