diff --git a/frontend/src/components/RecordsList.tsx b/frontend/src/components/RecordsList.tsx index 2e7e961c..f69b0b33 100644 --- a/frontend/src/components/RecordsList.tsx +++ b/frontend/src/components/RecordsList.tsx @@ -18,12 +18,7 @@ import { } from "ag-grid-community"; import { DataName, useHookLazyGeneric } from "../shared/types"; import SamplesList from "./SamplesList"; -import { - Sample, - SamplesListQuery, - SampleWhere, - SortDirection, -} from "../generated/graphql"; +import { Sample, SampleWhere, SortDirection } from "../generated/graphql"; import { defaultColDef } from "../shared/helpers"; import { PatientIdsTriplet } from "../pages/patients/PatientsPage"; import { ErrorMessage, LoadingSpinner, Toolbar } from "../shared/tableElements"; @@ -54,7 +49,6 @@ interface IRecordsListProps { showDownloadModal: boolean; setShowDownloadModal: Dispatch>; handleDownload: () => void; - prepareSamplesDataForAgGrid?: (samples: SamplesListQuery["samples"]) => any[]; samplesColDefs: ColDef[]; samplesParentWhereVariables: SampleWhere; samplesRefetchWhereVariables: ( @@ -84,7 +78,6 @@ export default function RecordsList({ showDownloadModal, setShowDownloadModal, handleDownload, - prepareSamplesDataForAgGrid, samplesColDefs, samplesParentWhereVariables, samplesRefetchWhereVariables, @@ -272,7 +265,6 @@ export default function RecordsList({
any[]; setUnsavedChanges?: (unsavedChanges: boolean) => void; parentDataName?: DataName; parentWhereVariables?: SampleWhere; @@ -61,7 +59,6 @@ interface ISampleListProps { export default function SamplesList({ columnDefs, - prepareDataForAgGrid, parentDataName, parentWhereVariables, refetchWhereVariables, @@ -120,7 +117,6 @@ export default function SamplesList({ }, [data]); const samples = data?.samples; - console.log(samples); const popupParamId = useMemo(() => { if (parentWhereVariables && samples && params) { @@ -268,14 +264,7 @@ export default function SamplesList({ {showDownloadModal && ( { - return Promise.resolve( - buildTsvString( - prepareDataForAgGrid - ? prepareDataForAgGrid(samples!) - : samples!, - columnDefs - ) - ); + return Promise.resolve(buildTsvString(samples!, columnDefs)); }} onComplete={() => { setShowDownloadModal(false); @@ -379,9 +368,7 @@ export default function SamplesList({ }, }} columnDefs={columnDefs} - rowData={ - prepareDataForAgGrid ? prepareDataForAgGrid(samples!) : samples! - } + rowData={samples!} onCellEditRequest={onCellValueChanged} readOnlyEdit={true} defaultColDef={defaultColDef}