Skip to content

Commit 3493845

Browse files
authored
[Discover][UnifiedDataTable] Fix row highlight when reordering columns (elastic#226584)
- Closes elastic#226528 ## Summary ![Jul-04-2025 15-29-24](https://github.com/user-attachments/assets/8197e3eb-48f7-43e5-bb8f-7e42ec2d6884) ### Checklist - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels.
1 parent 95518f9 commit 3493845

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/platform/packages/shared/kbn-unified-data-table/src/utils/get_render_cell_value.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ export const getRenderCellValueFn = ({
9090
} else {
9191
setCellProps({ style: undefined });
9292
}
93-
}, [ctx, row, setCellProps, anchorColor]);
93+
// re-apply styles if `columnId` changes, e.g. when reordering columns in the grid
94+
}, [ctx, row, setCellProps, anchorColor, columnId]);
9495

9596
if (typeof row === 'undefined') {
9697
return <span className={CELL_CLASS}>-</span>;

0 commit comments

Comments
 (0)