Skip to content

Commit a93e740

Browse files
committed
[ML] Change to DEFAULT_RESULTS_FIELD
1 parent 76488b6 commit a93e740

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • x-pack/plugins/ml/public/application/components/data_grid

x-pack/plugins/ml/public/application/components/data_grid/data_grid.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { euiDataGridStyle, euiDataGridToolbarSettings } from './common';
3131
import { UseIndexDataReturnType } from './types';
3232
import { DecisionPathPopover } from './feature_importance/decision_path_popover';
3333
import { TopClasses } from '../../../../common/types/feature_importance';
34+
import { DEFAULT_RESULTS_FIELD } from '../../data_frame_analytics/common/constants';
3435

3536
// TODO Fix row hovering + bar highlighting
3637
// import { hoveredRow$ } from './column_chart';
@@ -106,7 +107,7 @@ export const DataGrid: FC<Props> = memo(
106107
const row = data[rowIndex];
107108
if (!row) return <div />;
108109
// if resultsField for some reason is not available then use ml
109-
const mlResultsField = resultsField ?? 'ml';
110+
const mlResultsField = resultsField ?? DEFAULT_RESULTS_FIELD;
110111
const parsedFIArray = row[mlResultsField].feature_importance;
111112
let predictedValue: string | number | undefined;
112113
let topClasses: TopClasses = [];

0 commit comments

Comments
 (0)