import * as React from 'react'; import LazyLoadedTableCell from 'shared/lib/LazyLoadedTableCell'; import { Mutation, ClinicalData } from 'cbioportal-ts-api-client'; import MutationCountCache from '../../../cache/MutationCountCache'; import MutationTable, { IMutationTableProps } from '../MutationTable'; import generalStyles from './styles.module.scss'; export default class MutationCountColumnFormatter { public static makeRenderFunction
( table: MutationTable
) { return LazyLoadedTableCell( (d: Mutation[]) => { const mutationCountCache: MutationCountCache | undefined = table.props.mutationCountCache; if (mutationCountCache) { return mutationCountCache.get({ sampleId: d[0].sampleId, studyId: d[0].studyId, }); } else { return { status: 'error', data: null, }; } }, (t: ClinicalData) => (