From 548f768ff9e143b1826bec60122c44c059c31b8e Mon Sep 17 00:00:00 2001 From: Quynh Nguyen Date: Fri, 10 Feb 2023 11:28:03 -0600 Subject: [PATCH] Fix row index causing popover to not show up on page >=2 --- .../ml/public/application/components/data_grid/data_grid.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx index b2fceb58edfa4..95a7955ec9a39 100644 --- a/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx +++ b/x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx @@ -124,7 +124,7 @@ export const DataGrid: FC = memo( analysisType === ANALYSIS_CONFIG_TYPE.OUTLIER_DETECTION ) { if (schema === 'featureImportance') { - const row = data[rowIndex]; + const row = data[rowIndex - pagination.pageIndex * pagination.pageSize]; if (!row) return
; // if resultsField for some reason is not available then use ml const mlResultsField = resultsField ?? DEFAULT_RESULTS_FIELD;