Skip to content

Commit

Permalink
🔥 Remove warning message for last value
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Jun 4, 2021
1 parent 9417ccc commit 678fd95
Showing 1 changed file with 0 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -445,37 +445,6 @@ export const getDatatableVisualization = ({
return state;
}
},
getWarningMessages(state, frame) {
if (state?.columns.length === 0 || !frame.activeData) {
return;
}

const metricColumnsWithArrayValues = [];

for (const { columnId, summaryRow } of state.columns) {
const rows = frame.activeData[state.layerId] && frame.activeData[state.layerId].rows;
if (!rows || summaryRow == null || summaryRow === 'none') {
continue;
}
const columnToLabel = frame.datasourceLayers[state.layerId].getOperationForColumnId(columnId)
?.label;

const hasArrayValues = rows.some((row) => Array.isArray(row[columnId]));
if (hasArrayValues) {
metricColumnsWithArrayValues.push(columnToLabel || columnId);
}
}
return metricColumnsWithArrayValues.map((label) => (
<FormattedMessage
key={label}
id="xpack.lens.datatables.arrayValues"
defaultMessage="{label} contains array values. Summary rows will take into account each numeric value within the arrays."
values={{
label: <strong>{label}</strong>,
}}
/>
));
},
});

function getDataSourceAndSortedColumns(
Expand Down

0 comments on commit 678fd95

Please sign in to comment.