fix: 🩹 null value check for metric data

This commit is contained in:
AkashRajpurohit 2023-05-12 22:38:12 +05:30
parent 586529a5ca
commit c8ebb7695c

View File

@ -59,7 +59,10 @@ export function MetricsTable({
const filteredData = useMemo(() => {
if (data) {
let items = percentFilter(dataFilter ? dataFilter(data, filterOptions) : data);
const dataWithoutNullValues = data.filter(val => val.x !== null);
let items = percentFilter(
dataFilter ? dataFilter(dataWithoutNullValues, filterOptions) : dataWithoutNullValues,
);
if (limit) {
items = items.filter((e, i) => i < limit);
}