Merge pull request #2038 from AkashRajpurohit/fix/filter-null-values-on-metric-table

fix: 🩹 null value check for metric data
This commit is contained in:
Mike Cao 2023-05-12 18:57:38 -07:00 committed by GitHub
commit 345dee5720
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,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);
}